@keyframes itgDrawerFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes itgDrawerSlideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes itgDrawerSlideInLeft {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.itg-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    font-family: 'Outfit', sans-serif;
}

.itg-drawer-overlay.active {
    display: flex !important;
    animation: itgDrawerFadeIn 0.15s ease;
}

.itg-drawer-overlay--right { justify-content: flex-end; }
.itg-drawer-overlay--left { justify-content: flex-start; }

.itg-drawer-panel {
    position: relative;
    width: 95%;
    max-width: var(--drawer-width, 560px);
    height: 100%;
    max-height: 100vh;
    background: #fff;
    box-shadow: -16px 0 48px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Outfit', sans-serif;
}

.itg-drawer-overlay--left .itg-drawer-panel {
    box-shadow: 16px 0 48px rgba(0, 0, 0, 0.18);
}

.itg-drawer-overlay--right.active .itg-drawer-panel {
    animation: itgDrawerSlideInRight 0.22s ease;
}

.itg-drawer-overlay--left.active .itg-drawer-panel {
    animation: itgDrawerSlideInLeft 0.22s ease;
}

/* Accent bar - full height 4px strip on the leading edge */
.itg-drawer-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-bar-color, var(--primary));
    z-index: 1;
}

.itg-drawer-overlay--left .itg-drawer-panel::before {
    left: auto;
    right: 0;
}

.itg-drawer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 24px 0;
    flex-shrink: 0;
}

.itg-drawer-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.3;
}

.itg-drawer-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    border-radius: 50%;
    font-size: 1.3rem;
    line-height: 1;
    color: var(--muted-darker, #B0B0B0);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
    padding: 0;
}

.itg-drawer-close:hover {
    background: var(--gray-100, #f1f3f5);
    color: var(--gray-800, #343a40);
}

.itg-drawer-body {
    padding: 16px 24px 20px;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 80px;
    color: var(--primary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.itg-drawer-body .text-muted {
    color: var(--muted-darker, #adb5bd) !important;
}

.itg-drawer-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 24px 20px;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.itg-drawer-footer .btn {
    padding: 8px 20px;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1.4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
}

.itg-drawer-footer .btn-primary-modern {
    background: var(--primary);
    color: #fff;
    border: none;
}

.itg-drawer-footer .btn-primary-modern:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #fff;
}

.itg-drawer-footer .btn-secondary-modern {
    background: transparent;
    color: var(--muted-darker, #B0B0B0);
    border: 1px solid var(--gray-200, #e9ecef);
}

.itg-drawer-footer .btn-secondary-modern:hover {
    background: var(--gray-50, #f8f9fa);
    color: var(--gray-700, #495057);
    border-color: var(--gray-300, #dee2e6);
}

.itg-drawer-footer .btn-danger-modern {
    background: transparent;
    color: #dc3545;
    border: 1px solid #dc3545;
}

.itg-drawer-footer .btn-danger-modern:hover {
    background: #dc3545;
    color: #fff;
    border-color: #dc3545;
}

.itg-drawer-footer .btn-group-modern {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ========================================
   DRAWER BODY ACTIONS
   (section header with kebab action menu)
   ======================================== */

.itg-drawer-body .itg-detail-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.itg-drawer-body .itg-detail-section-head .itg-detail-section-title {
    margin-bottom: 0;
}

.itg-drawer-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px 0;
    color: var(--gray-500, #adb5bd);
}

/* Detail presentation lives in the shared booking-detail component. */

/* Vertically center cell text and the row action kebab. */
.itg-drawer-body .itg-version-table th,
.itg-drawer-body .itg-version-table td {
    vertical-align: middle;
}

@media (max-width: 768px) {
    .itg-drawer-panel {
        width: 100%;
        max-width: 100%;
    }

    .itg-drawer-body .itg-detail-label {
        flex: 0 0 45%;
    }
}

/* ========================================
   DRAWER TABS
   ======================================== */

.itg-drawer-body .itg-drawer-tabs {
    margin: 0 0 4px;
    border-bottom: 1px solid var(--gray-200, #e9ecef);
    flex-wrap: nowrap;
}

.itg-drawer-body .itg-drawer-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    background: none;
    color: var(--gray-500, #adb5bd);
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 14px;
    transition: color 0.15s, border-color 0.15s;
}

.itg-drawer-body .itg-drawer-tabs .nav-link:hover {
    color: var(--primary);
    border-bottom-color: var(--gray-200, #e9ecef);
}

.itg-drawer-body .itg-drawer-tabs .nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: none;
}

.itg-drawer-body .itg-drawer-tab-content {
    padding-top: 16px;
}
