/**
 * File: src/assets/css/clisyc-appointment-detail.css
 * Styles for the redesigned [clisyc_appointment_detail] shortcode view.
 *
 * @package    ClientSync
 * @subpackage ClientSync/Assets/CSS
 */

/* --- 1. Main Card Container --- */
.clisyc-appointment-detail-card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    max-width: 800px;
    margin: 2em auto;
    overflow: hidden; /* To contain the status badge */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* --- 2. Card Header --- */
.clisyc-detail-header {
    padding: 24px 32px;
    position: relative;
    border-bottom: 1px solid #f3f4f6;
}

.clisyc-detail-header h2 {
    font-size: 1.75em;
    font-weight: 700;
    color: #111827;
    margin: 0;
    padding-right: 120px; /* Space for the badge */
    line-height: 1.3;
}

/* --- 3. Status Badge (copied from cards for consistency) --- */
.clisyc-detail-status-badge {
    position: absolute;
    top: 24px;
    right: 32px;
    padding: 8px 16px;
    border-radius: 9999px;
    font-size: 0.8em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.clisyc-status-confirmed { background-color: #d1fae5; color: #065f46; }
.clisyc-status-pending { background-color: #fef3c7; color: #92400e; }
.clisyc-status-cancelled { background-color: #fee2e2; color: #991b1b; }
.clisyc-status-completed { background-color: #e0e7ff; color: #3730a3; }

/* --- 4. Core Info Section (Date & Time) --- */
.clisyc-core-info {
    display: flex;
    gap: 24px;
    padding: 24px 32px;
}

.clisyc-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.clisyc-info-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--clisyc-icon-bg, #1F2938);
    color: var(--clisyc-icon-text, #ffffff);
}

.clisyc-info-icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.clisyc-info-text {
    font-size: 1em;
    line-height: 1.5;
}

.clisyc-info-text strong {
    display: block;
    font-weight: 600;
    color: #111827;
}

.clisyc-info-text span {
    color: #6b7280;
}

/* --- 5. Detail Sections (for Dimensions & Custom Fields) --- */
.clisyc-detail-section {
    padding: 24px 32px;
    border-top: 1px solid #f3f4f6;
}

.clisyc-detail-section h3 {
    font-size: 1.25em;
    font-weight: 600;
    color: #111827;
    margin: 0 0 16px;
}

.clisyc-details-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.clisyc-details-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 0;
    border-bottom: 1px solid #f9fafb;
}
.clisyc-details-list li:last-child {
    border-bottom: none;
}

.clisyc-details-list .label {
    font-weight: 500;
    color: #6b7280;
}

.clisyc-details-list .value {
    font-weight: 600;
    color: #1f2937;
    text-align: right;
}

/* Image Map Display */
.clisyc-image-marker-display-wrapper {
    position: relative;
    max-width: 100%;
    border: 1px solid #ddd;
    line-height: 0;
    margin-top: 10px;
}
.clisyc-image-marker-display-wrapper > img { max-width: 100%; height: auto; }
.clisyc-image-marker-display-wrapper > .clisyc-marker-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }

/* --- 6. Action Buttons --- */
.clisyc-detail-actions {
    padding: 24px 32px;
    background-color: #f9fafb;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.clisyc-detail-actions .button {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 1em;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    min-height: 44px;
    transition: all 0.2s;
}

.clisyc-detail-actions .clisyc-button-ical {
    background: #374151;
    border-color: #374151;
    color: #ffffff;
}
.clisyc-detail-actions .clisyc-button-ical:hover {
    background: #1f2937;
    border-color: #1f2937;
}

.clisyc-detail-actions .clisyc-button-cancel {
    background: transparent;
    border: 1px solid #ef4444;
    color: #ef4444;
}
.clisyc-detail-actions .clisyc-button-cancel:hover {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}

/* --- 7. Responsive --- */
@media (max-width: 768px) {
    .clisyc-appointment-detail-card {
        margin: 1em 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .clisyc-detail-header,
    .clisyc-core-info,
    .clisyc-detail-section,
    .clisyc-detail-actions {
        padding: 20px;
    }

    .clisyc-detail-header h2 {
        font-size: 1.5em;
    }

    .clisyc-core-info {
        flex-direction: column;
        gap: 20px;
    }
    
    .clisyc-detail-actions .button {
        width: 100%;
    }
}