/* ReserBee Super Admin - Modal Styles */
/* Modal, Login As Modal, Subscription Modal, Toggle, Fees */

/* ============================================
   MODAL STYLES
   ============================================ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg-white);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

.modal-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.75rem;
    color: var(--charcoal);
    font-family: var(--font-sans);
    font-weight: 300;
}

.modal-close {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    background: white;
    color: var(--text-medium);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--danger-red);
    border-color: var(--danger-red);
    color: white;
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* ============================================
   LOGIN AS MODAL
   ============================================ */

.login-as-info {
    text-align: center;
    padding: 1rem 0;
}

.login-as-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--info-blue);
    animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
}

.login-as-info h3 {
    font-size: 1.5rem;
    color: var(--charcoal);
    margin-bottom: 0.75rem;
    font-family: var(--font-sans);
    font-weight: 300;
}

.login-as-info p {
    color: var(--text-medium);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.login-as-warning {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-lg);
    color: var(--info-blue);
    font-size: 0.875rem;
    font-weight: 500;
}

.login-as-warning i {
    font-size: 1.125rem;
}

/* ============================================
   SUBSCRIPTION MODAL STYLES
   ============================================ */

.subscription-business-info {
    margin-bottom: 1rem;
}

.subscription-business-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-xl);
    border: 1.5px solid var(--border-light);
    background: var(--bg-light);
    font-weight: 600;
    color: var(--charcoal);
}

.subscription-business-badge i {
    color: var(--honey);
    font-size: 1.1rem;
}

.btn-stripe-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    background: var(--honey);
    color: var(--charcoal);
    border: 1px solid var(--charcoal);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-stripe-link:hover {
    box-shadow: var(--shadow-honey);
    transform: translateY(-1px);
}

.btn-stripe-link i {
    font-size: 0.9375rem;
}

.stripe-status-card {
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    border: 1.5px solid var(--border-light);
    background: var(--bg-light);
}

.stripe-status-card.status-active {
    border-color: rgba(52, 211, 153, 0.4);
    background: rgba(52, 211, 153, 0.05);
}

.stripe-status-card.status-inactive {
    border-color: rgba(156, 163, 175, 0.4);
    background: rgba(156, 163, 175, 0.05);
}

.stripe-status-card.status-trialing {
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(59, 130, 246, 0.05);
}

.stripe-status-card.status-canceled {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.05);
}

.stripe-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.stripe-status-row:not(:last-child) {
    border-bottom: 1px solid var(--border-light);
}

.stripe-status-label {
    font-size: 0.875rem;
    color: var(--text-medium);
}

.stripe-status-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--charcoal);
}

.stripe-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.stripe-status-badge.active {
    background: rgba(52, 211, 153, 0.15);
    color: #059669;
}

.stripe-status-badge.trialing {
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
}

.stripe-status-badge.canceled {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

.stripe-status-badge.inactive {
    background: rgba(156, 163, 175, 0.15);
    color: #6b7280;
}

/* Override Toggle */
.override-toggle-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius-lg);
    border: 1.5px solid var(--border-light);
    background: var(--bg-white);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-medium);
    border-radius: 26px;
    transition: all 0.3s ease;
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--honey);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(22px);
}

.toggle-label {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.toggle-title {
    font-weight: 300;
    color: var(--charcoal);
    font-size: 0.9375rem;
}

.toggle-description {
    font-size: 0.8125rem;
    color: var(--text-medium);
}

/* Fees Grid in Modal */
.fees-grid-modal {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.fee-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.fee-input-group .form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fee-input-group .form-label i {
    color: var(--charcoal);
    font-size: 0.875rem;
}

.fee-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.fee-input-wrapper .premium-input {
    padding-right: 2.5rem;
}

.fee-suffix {
    position: absolute;
    right: 1rem;
    color: var(--text-medium);
    font-weight: 500;
    font-size: 0.9375rem;
    pointer-events: none;
}

@media (max-width: 480px) {
    .fees-grid-modal {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   RESPONSIVE DESIGN - MODALS
   ============================================ */

@media (max-width: 768px) {
    .modal-content {
        max-width: 95%;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1.5rem;
    }
}

/* ============================================
   CHECKBOX GROUP STYLES
   ============================================ */

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-light, #f8fafc);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.checkbox-item:hover {
    background: var(--bg-hover, #f1f5f9);
}

.checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color, #3b82f6);
    cursor: pointer;
}

.checkbox-item span {
    font-size: 0.875rem;
    color: var(--text-color, #374151);
}
