/* ===== Shared Detail Pages Component ===== */
/* Mobile-first approach for all detail pages (property, recruitment, etc.) */

/* ===== Detail Page Container ===== */
.detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

@media (min-width: 768px) {
    .detail-container {
        padding: 0 15px;
    }
}

/* ===== Detail Header Section ===== */
/* Mobile: Clean white background without borders */
.detail-header {
    background: white;
    padding: 16px;
}

/* Desktop: Add borders and shadows */
@media (min-width: 992px) {
    .detail-header {
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        margin-bottom: 16px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        padding: 24px;
    }
}

/* ===== Detail Content Section ===== */
/* Mobile: Clean sections with white backgrounds */
.detail-section {
    background: white;
    padding: 16px;
    /* margin-top: 8px; */
}

.detail-section:first-child {
    margin-top: 0;
}

/* Desktop: Add borders and visual separation */
@media (min-width: 992px) {
    .detail-section {
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        margin-top: 0;
        margin-bottom: 16px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        padding: 24px;
    }
}

/* ===== Detail Main Content ===== */
/* Mobile: No borders */
.detail-main {
    background: white;
    padding: 16px;
}

/* Desktop: Add borders and shadows */
@media (min-width: 992px) {
    .detail-main {
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 24px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }
}

/* ===== Detail Sidebar ===== */
/* Mobile: Simple white sections */
.detail-sidebar-card {
    background: white;
    padding: 16px;
    margin-top: 8px;
}

.detail-sidebar-card:first-child {
    margin-top: 0;
}

/* Desktop: Add borders and spacing */
@media (min-width: 992px) {
    .detail-sidebar-card {
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 20px;
        margin-top: 0;
        margin-bottom: 16px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }
    
    .detail-sidebar-card:last-child {
        margin-bottom: 0;
    }
}

/* ===== Info Box/Card ===== */
/* Mobile: Clean info boxes without borders */
.detail-info-box {
    background: white;
    padding: 16px;
}

/* Desktop: Add subtle borders */
@media (min-width: 992px) {
    .detail-info-box {
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 20px;
        margin-bottom: 16px;
    }
}

/* ===== Cost/Price Tables ===== */
/* Mobile: Simple table with borders */
.detail-table-wrapper {
    width: 100%;
    padding: 0;
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #000;
    background: white;
}

.detail-table td {
    padding: 12px 8px;
    text-align: center;
    vertical-align: middle;
    border: 1px solid #000;
    background: #f8f9fa;
}

/* Desktop: Enhanced table styling */
@media (min-width: 992px) {
    .detail-table-wrapper {
        padding: 0 8px;
    }
    
    .detail-table {
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }
    
    .detail-table td {
        padding: 16px 12px;
    }
}

/* ===== Fixed Footer Actions (Mobile) ===== */
/* Mobile: Fixed at bottom */
@media (max-width: 991px) {
    .detail-fixed-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        background: white;
        padding: 12px 16px;
        z-index: var(--z-action-button);
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        border-top: 1px solid #e0e0e0;
    }
    
    /* Add padding to main content to prevent overlap */
    body.has-fixed-footer main {
        padding-bottom: 100px;
    }
}

/* Desktop: Normal positioning */
@media (min-width: 992px) {
    .detail-fixed-footer {
        position: relative;
        padding: 0;
        box-shadow: none;
        border: none;
    }
}

/* ===== Action Buttons ===== */
.detail-action-button {
    width: 100%;
    padding: 12px 20px;
    min-height: 48px;
    border: none;
    border-radius: 9999px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 200ms ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.detail-action-button--primary {
    background: var(--primary-blue);
    color: white;
}

.detail-action-button--primary:hover {
    background: var(--primary-blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.detail-action-button--secondary {
    background: var(--accent-blue);
    color: white;
}

.detail-action-button--secondary:hover {
    background: #0284c7;
    transform: translateY(-1px);
}

/* ===== Section Titles ===== */
.detail-section-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: #333;
}

@media (min-width: 768px) {
    .detail-section-title {
        font-size: 18px;
        margin-bottom: 20px;
    }
}

/* ===== Responsive Grid Helpers ===== */
/* Mobile-first responsive columns */
.detail-grid {
    display: grid;
    gap: 16px;
}

.detail-grid--2cols {
    grid-template-columns: 1fr;
}

.detail-grid--3cols {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.detail-grid--4cols {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* Tablet and larger */
@media (min-width: 768px) {
    .detail-grid--2cols {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .detail-grid--4cols {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Desktop layout adjustments */
@media (min-width: 992px) {
    .detail-grid {
        gap: 20px;
    }
    
    .detail-grid--3cols {
        gap: 16px;
    }
}

/* ===== Utility Classes ===== */
/* Hide/show elements based on screen size */
.detail-mobile-only {
    display: block;
}

.detail-desktop-only {
    display: none;
}

@media (min-width: 992px) {
    .detail-mobile-only {
        display: none;
    }
    
    .detail-desktop-only {
        display: block;
    }
}

/* ===== Smooth Transitions ===== */
.detail-section,
.detail-header,
.detail-main,
.detail-sidebar-card,
.detail-info-box {
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

/* ===== Print Styles ===== */
@media print {
    .detail-fixed-footer,
    .detail-mobile-only {
        display: none;
    }
    
    .detail-section,
    .detail-header,
    .detail-main,
    .detail-sidebar-card {
        border: none;
        box-shadow: none;
        page-break-inside: avoid;
    }
}