/* ============================================
   ASTRO CRM - CUSTOM MODAL SYSTEM (modal.js)
   Classes used by modal.js for confirm/alert dialogs
   ============================================ */

/* Backdrop - Full screen overlay */
.custom-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-modal-backdrop--show {
    opacity: 1;
}

/* Modal Container */
.custom-modal {
    width: 100%;
    max-width: 500px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.custom-modal-backdrop--show .custom-modal {
    transform: scale(1);
}

/* Modal Header */
.custom-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
}

.custom-modal__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    font-size: 32px;
}

.custom-modal__icon--info {
    background: rgba(59, 130, 246, 0.1);
    color: #3B82F6;
}

.custom-modal__icon--warning {
    background: rgba(245, 158, 11, 0.1);
    color: #F59E0B;
}

.custom-modal__icon--danger {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
}

.custom-modal__icon--success {
    background: rgba(34, 197, 94, 0.1);
    color: #22C55E;
}

/* Modal Body */
.custom-modal__body {
    padding: 24px;
}

.custom-modal__title {
    font-size: 18px;
    font-weight: 700;
    color: #1E293B;
    margin: 0;
}

.custom-modal__close {
    background: transparent;
    border: none;
    font-size: 24px;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.custom-modal__close:hover {
    color: #ef4444;
}

.custom-modal__message {
    font-size: 15px;
    line-height: 1.6;
    color: #64748B;
    margin: 0;
    white-space: pre-line;
}

/* Modal Footer */
.custom-modal__footer {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px 24px;
}

.custom-modal__btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    min-width: 100px;
}

.custom-modal__btn--cancel {
    background: #F1F5F9;
    color: #64748B;
    border: 1px solid #E2E8F0;
}

.custom-modal__btn--cancel:hover {
    background: #E2E8F0;
    color: #475569;
}

.custom-modal__btn--confirm {
    background: #3B82F6;
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.custom-modal__btn--confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.custom-modal__btn--confirm:active {
    transform: translateY(0);
}

/* Type-specific button colors */
.custom-modal__btn--warning {
    background: #F59E0B;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.custom-modal__btn--warning:hover {
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
}

.custom-modal__btn--danger {
    background: #EF4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.custom-modal__btn--danger:hover {
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

.custom-modal__btn--success {
    background: #22C55E;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.custom-modal__btn--success:hover {
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4);
}

/* ============================================
   ASTRO CRM - STANDARD MODAL SYSTEM (Standardized Pattern)
   ============================================ */

.admin-user-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-4);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.admin-user-modal-backdrop.active {
    display: flex !important;
    opacity: 1;
}

.admin-user-modal {
    width: 100%;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-2xl);
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    transform: scale(0.95);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.admin-user-modal-backdrop.active .admin-user-modal {
    transform: scale(1);
}

.admin-user-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-6);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.admin-user-modal__title {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--color-text-dark);
}

.admin-user-modal__title-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(var(--color-primary-rgb), 0.1);
    border-radius: var(--radius-lg);
    color: var(--color-primary);
}

.admin-user-modal__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.admin-user-modal__close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-error);
}

.admin-user-modal__body {
    padding: var(--spacing-6);
    max-height: 80vh;
    overflow-y: auto;
}

.admin-user-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: var(--spacing-5) var(--spacing-6);
    background: rgba(248, 250, 252, 0.5);
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.admin-user-modal__btn {
    padding: 10px 20px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-user-modal__btn--secondary {
    background: white;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
}

.admin-user-modal__btn--secondary:hover {
    background: var(--color-surface-hover);
    color: var(--color-text-dark);
}

.admin-user-modal__btn--primary {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.2);
}

.admin-user-modal__btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(var(--color-primary-rgb), 0.3);
}

/* Warnings and Specific States */
.admin-user-modal--warning .admin-user-modal__title-icon {
    background: rgba(var(--color-warning-rgb), 0.1);
    color: var(--color-warning);
}

.admin-modal__subtitle {
    font-size: 12px;
    color: var(--color-text-muted);
    font-weight: 400;
}