/* =====================================================
   CoderStation Dialog Form — Global Design System
   ===================================================== */

/* Page wrapper */
.dialog-form-page,
.confirmation-form-page {
    color: var(--text-color);
}

.dialog-form-page .dialog-page-title {
    color: var(--primary-color);
}


/* =====================================================
   Modal Container — shared by ALL dialog variants
   Consistent 12px radius to wrap header + footer flush
   ===================================================== */
.modal-content.coderstation-card,
.modal-content.dialog-modal-content {
    border-radius: 6px !important;
    overflow: visible !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22), 0 4px 16px rgba(0, 0, 0, 0.10);
    border: 1px solid rgba(0, 0, 0, 0.08);
    transform: none !important;
    transition: none !important;
}


/* =====================================================
   Header — gradient, top-radius matches container
   ===================================================== */
.dialog-modal-header,
.modal-content.coderstation-card .modal-header.card-custom-header {
    background: var(--primary-color) !important;
    border-top: 3px solid var(--secondary-color) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    border-top-left-radius: 5px !important;
    border-top-right-radius: 5px !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    padding: 10px 18px !important;
    gap: 12px;
    min-height: 54px;
    color: #fff;
}

/* Header icon box */
.dialog-modal-header-icon,
.modal-content.coderstation-card .modal-header.card-custom-header .header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 8px;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    flex-shrink: 0;
}

/* Header title */
.dialog-modal-header-title,
.modal-content.coderstation-card .modal-header.card-custom-header .header-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.3px;
    margin: 0;
    line-height: 1.2;
}

/* Header subtitle */
.dialog-modal-header-subtitle,
.modal-content.coderstation-card .modal-header.card-custom-header .header-subtitle {
    font-size: 0.70rem;
    opacity: 0.78;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    line-height: 1.2;
}

.dialog-modal-header .header-icon {
    font-size: 1.6rem;
    position: relative;
    top: 1px;
}

/* Close button — unified elegant design across all dialogs */
.dialog-modal-header .dialog-close-btn,
.modal-content.coderstation-card .modal-header.card-custom-header .dialog-close-btn {
    background: transparent;
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    min-width: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.2s ease;
    margin-left: auto;
    margin-right: -5px;
    flex-shrink: 0;
    opacity: 0.8;
}

.dialog-modal-header .dialog-close-btn i,
.modal-content.coderstation-card .modal-header.card-custom-header .dialog-close-btn i {
    font-size: 1.25rem;
    color: #ffffff;
    transition: color 0.2s ease;
    line-height: 1;
}

.dialog-modal-header .dialog-close-btn:hover,
.modal-content.coderstation-card .modal-header.card-custom-header .dialog-close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    opacity: 1;
}

.dialog-modal-header .dialog-close-btn:hover i,
.modal-content.coderstation-card .modal-header.card-custom-header .dialog-close-btn:hover i {
    color: #ff6b6b;
}

.dialog-modal-header .dialog-close-btn:active,
.modal-content.coderstation-card .modal-header.card-custom-header .dialog-close-btn:active {
    background: rgba(255, 255, 255, 0.25);
}



/* =====================================================
   Body
   ===================================================== */
.dialog-modal-body,
.modal-content.coderstation-card .modal-body.card-body,
.modal-content.dialog-modal-content .modal-body {
    background-color: #f8fafc;
    border-radius: 0;
    overflow: visible !important;
}


/* =====================================================
   Footer — light tray, bottom-radius matches container
   All buttons right-aligned by default
   ===================================================== */
.dialog-modal-footer,
.dialog-modal-content .card-custom-footer,
.dialog-form-container .card-custom-footer {
    background-color: #f1f5f9;
    border-top: 1px solid #e2e8f0 !important;
    padding: 7px 1.1rem 10px 1.1rem !important;
    border-bottom-left-radius: 6px !important;
    border-bottom-right-radius: 6px !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center;
    gap: 0.5rem;
}

/* =====================================================
   CoderStation Buttons inside Dialog Forms (+4px height)
   ===================================================== */
.dialog-modal-content .primary-button,
.dialog-modal-content .cancel-button,
.dialog-modal-content .camera-button,
.dialog-modal-footer .primary-button,
.dialog-modal-footer .cancel-button,
.dialog-modal-footer .camera-button,
.dialog-modal-footer .btn,
.card-custom-footer .primary-button,
.card-custom-footer .cancel-button,
.card-custom-footer .btn,
.modal-content.dialog-modal-content .primary-button,
.modal-content.dialog-modal-content .cancel-button,
.modal-content.dialog-modal-content .btn {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
    min-height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}


/* =====================================================
   Animations
   ===================================================== */
.fade-in {
    animation: fadeIn 0.35s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}