/* ===================================
   SHARED DETAIL PAGE STYLES
   For: Associations, Corporations, and Persons detail pages
   =================================== */

/* ===================================
   PAGE HEADER
   =================================== */

.d-flex.justify-content-between.align-items-center.pt-3.pb-2.mb-3.border-bottom {
    padding-top: 1.5rem !important;
    padding-bottom: 1rem !important;
    margin-bottom: 2rem !important;
    border-bottom: 2px solid #e9ecef !important;
}

.d-flex.justify-content-between h1.h2 {
    margin-bottom: 0;
    font-weight: 600;
    color: #212529;
    font-size: 1.75rem;
}

.d-flex.justify-content-between h1.h2 i {
    color: #0d6efd;
}

/* ===================================
   BUTTON TOOLBAR
   =================================== */

.btn-toolbar {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.75rem;
    align-items: center;
}

.btn-toolbar .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.15s ease-in-out;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-toolbar .btn i {
    font-size: 0.9375rem;
}

/* Primary button */
.btn-toolbar .btn-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    border: 1px solid #0d6efd;
    color: white;
    box-shadow: 0 2px 4px rgba(13, 110, 253, 0.2);
    padding: 0.4rem 0.8rem;
    min-height: 36px;
}

.btn-toolbar .btn-primary i {
    margin-right: 0.4rem;
    font-size: 0.85rem;
}

.btn-toolbar .btn-primary:hover {
    background: linear-gradient(135deg, #0b5ed7 0%, #0a58ca 100%);
    border-color: #0b5ed7;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
}

.btn-toolbar .btn-primary:active {
    transform: translateY(1px);
    transition: none;
}

.btn-toolbar .btn-primary:focus,
.btn-toolbar .btn-primary:focus-visible {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Danger button */
.btn-toolbar .btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: 1px solid #dc3545;
    color: white;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
    padding: 0.4rem 0.8rem;
    min-height: 36px;
}

.btn-toolbar .btn-danger i {
    margin-right: 0.4rem;
    font-size: 0.85rem;
}

.btn-toolbar .btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    border-color: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.btn-toolbar .btn-danger:active {
    transform: translateY(1px);
    transition: none;
}

.btn-toolbar .btn-danger:focus,
.btn-toolbar .btn-danger:focus-visible {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Outline secondary button */
.btn-toolbar .btn-outline-secondary {
    border: 1px solid #6c757d;
    color: #6c757d;
    background: transparent;
    padding: 0.4rem 0.8rem;
    min-height: 36px;
}

.btn-toolbar .btn-outline-secondary i {
    margin-right: 0.4rem;
    font-size: 0.85rem;
}

.btn-toolbar .btn-outline-secondary:hover {
    background: #6c757d;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(108, 117, 125, 0.25);
}

/* ===================================
   TAB NAVIGATION
   =================================== */

.nav.nav-tabs {
    border-bottom: 1px solid rgba(0,0,0,0.08);
    padding: 0.25rem 0.5rem;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    background-color: rgba(255,255,255,0.98);
}

.nav.nav-tabs .nav-link {
    white-space: nowrap;
    color: #212529;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    padding: 0.4rem 0.65rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
}

.nav.nav-tabs .nav-link:hover {
    background-color: rgba(0,0,0,0.02);
    color: #0d6efd;
}

.nav.nav-tabs .nav-link.active {
    background-color: #fff;
    border-color: rgba(0,0,0,0.06);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    color: #0d6efd;
}

.nav.nav-tabs .nav-link:focus {
    outline: 3px solid rgba(13,110,253,0.12);
    outline-offset: 2px;
}

.tab-content > .tab-pane {
    margin-top: 0.75rem;
}

/* Mobile selector for tabs */
#detail-section-select {
    width: 100%;
    margin-bottom: 0.5rem;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    border: 1px solid #dee2e6;
    background-color: #fff;
}

#detail-section-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    outline: 0;
}

/* ===================================
   CARD STYLES
   =================================== */

.card-header h5,
.card-header .h5 {
    margin-bottom: 0;
    font-weight: 600;
    color: #212529;
    font-size: 1.1rem;
}

/* ===================================
   UTILITIES
   =================================== */

.info-label {
    min-width: 120px;
    display: inline-block;
    text-align: left;
    font-weight: 600;
    color: #495057;
}

.info-label .fas,
.info-label .far,
.info-label .fa {
    font-size: 1.05rem;
    vertical-align: -0.08em;
    margin-right: 0.5rem;
}

a[href^="tel:"],
a[href^="mailto:"] {
    color: #0d6efd;
    text-decoration: none;
}

a[href^="tel:"]:hover,
a[href^="mailto:"]:hover {
    text-decoration: underline;
}

.row.g-3 > div .badge {
    margin-top: 0.15rem;
}

/* ===================================
   RESPONSIVE BREAKPOINTS
   =================================== */

@media (min-width: 768px) {
    .nav.nav-tabs {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        z-index: 50 !important;
    }

    .nav.nav-tabs .nav-link {
        display: inline-block !important;
    }

    .d-flex.justify-content-between h1.h2 {
        font-size: 2rem;
    }

    .info-label {
        min-width: 160px;
    }
}

@media (max-width: 767.98px) and (min-width: 577px) {
    .btn-toolbar {
        gap: 0.5rem;
    }
    
    .btn-toolbar .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .btn-toolbar .btn i {
        margin-right: 0.375rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 576px) {
    .d-flex.justify-content-between h1.h2 {
        font-size: 1.5rem;
    }
    
    .btn-toolbar {
        align-self: stretch;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .btn-toolbar .btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
        padding: 0.5rem 0.75rem;
        min-height: 44px;
        border-radius: 0.375rem;
        font-size: 0.875rem;
    }
    
    .btn-toolbar .btn i {
        margin-right: 0.375rem;
        font-size: 0.875rem;
    }

    .info-label {
        min-width: 110px;
    }
}
