/**
 * CSS para Sistema de Pausas e Cancelamentos - Blue Project V2
 * Estilos completos para modais, botões e notificações
 */

/* ===================================
   MODAIS PRINCIPAIS
   =================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.3s ease;
}

.modal-overlay.show .modal-content {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 25px;
}

/* ===================================
   MODAIS ESPECÍFICOS
   =================================== */

.pause-modal .modal-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}

.cancellation-modal .modal-header {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

/* ===================================
   TIER BADGES
   =================================== */

.pause-tier-info {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.tier-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.tier-badge.tier-basic {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: white;
}

.tier-badge.tier-standard {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
}

.tier-badge.tier-premium {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.tier-badge.tier-enterprise {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

/* ===================================
   FORMULÁRIOS
   =================================== */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.checkbox-label {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 0 !important;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto !important;
    margin: 0;
    margin-top: 2px;
}

/* ===================================
   ALERTAS E AVISOS
   =================================== */

.alert {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background: #ecfdf5;
    border-color: #10b981;
    color: #047857;
}

.alert-warning {
    background: #fffbeb;
    border-color: #f59e0b;
    color: #92400e;
}

.alert-danger {
    background: #fef2f2;
    border-color: #ef4444;
    color: #b91c1c;
}

.alert-info {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1d4ed8;
}

/* ===================================
   RESUMOS E INFORMAÇÕES
   =================================== */

.pause-summary,
.cancellation-details {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.pause-summary h4,
.cancellation-details h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #374151;
}

.pause-summary ul,
.cancellation-details ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.pause-summary li,
.cancellation-details li {
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
}

.pause-summary li:last-child,
.cancellation-details li:last-child {
    border-bottom: none;
}

.penalty-amount {
    text-align: center;
    margin: 15px 0;
}

.penalty-amount strong {
    display: block;
    font-size: 2rem;
    color: #dc2626;
    margin-bottom: 5px;
}

.penalty-amount small {
    color: #6b7280;
    font-size: 0.9rem;
}

/* ===================================
   BOTÕES DE AÇÃO
   =================================== */

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.3);
}

.btn-secondary {
    background: #f8fafc;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.btn-secondary:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.3);
}

/* ===================================
   BOTÕES NA INTERFACE PRINCIPAL
   =================================== */

.subscription-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.subscription-actions .btn {
    flex: 1;
    min-width: auto;
}

.pause-btn {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
}

.pause-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.3);
}

.cancel-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.cancel-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

/* ===================================
   STATUS INDICATORS
   =================================== */

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge[data-booking-status="active"] {
    background: #dcfce7;
    color: #166534;
}

.status-badge[data-booking-status="paused"] {
    background: #fef3c7;
    color: #92400e;
}

.status-badge[data-booking-status="cancelled"] {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge[data-booking-status="pending"] {
    background: #e0e7ff;
    color: #3730a3;
}

/* ===================================
   LOADING OVERLAY
   =================================== */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.loading-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #4f46e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===================================
   NOTIFICAÇÕES
   =================================== */

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 400px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 10002;
    transform: translateX(100%);
    animation: slideIn 0.3s ease forwards;
}

.notification.fade-out {
    animation: slideOut 0.3s ease forwards;
}

@keyframes slideIn {
    to { transform: translateX(0); }
}

@keyframes slideOut {
    to { transform: translateX(100%); }
}

.notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
}

.notification-message {
    flex: 1;
    margin-right: 15px;
}

.notification-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.notification-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.notification-success {
    border-left: 4px solid #10b981;
}

.notification-error {
    border-left: 4px solid #ef4444;
}

.notification-info {
    border-left: 4px solid #3b82f6;
}

.notification-warning {
    border-left: 4px solid #f59e0b;
}

/* ===================================
   RESPONSIVIDADE
   =================================== */

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions .btn {
        width: 100%;
    }
    
    .subscription-actions {
        flex-direction: column;
    }
    
    .notification {
        left: 10px;
        right: 10px;
        max-width: none;
    }
    
    .penalty-amount strong {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-header h3 {
        font-size: 1.3rem;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px;
    }
    
    .btn {
        padding: 10px 20px;
        min-width: 100px;
    }
}

/* ===================================
   DARK MODE SUPPORT
   =================================== */

@media (prefers-color-scheme: dark) {
    .modal-content {
        background: #1f2937;
        color: #f9fafb;
    }
    
    .modal-body {
        color: #e5e7eb;
    }
    
    .form-group label {
        color: #d1d5db;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        border-color: #6366f1;
    }
    
    .pause-summary,
    .cancellation-details {
        background: #374151;
    }
    
    .pause-tier-info {
        background: #374151;
    }
    
    .notification {
        background: #1f2937;
        color: #f9fafb;
    }
    
    .loading-content {
        background: #1f2937;
        color: #f9fafb;
    }
    
    .btn-secondary {
        background: #374151;
        color: #d1d5db;
        border-color: #4b5563;
    }
    
    .btn-secondary:hover {
        background: #4b5563;
    }
}

/* ===================================
   ANIMAÇÕES E EFEITOS
   =================================== */

.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.tier-badge {
    position: relative;
    overflow: hidden;
}

.tier-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.tier-badge:hover::before {
    left: 100%;
}

/* ===================================
   UTILITÁRIOS
   =================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }

.hidden { display: none !important; }
.visible { display: block !important; }

.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
