/* Modal de Cadastro Compacto - Mirai Clinic */
/* Cores oficiais: #1a252f (primária), #D3BA70 (dourado), #4456A6 (accent) */

.register-modal-compact {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 37, 47, 0.8);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.register-modal-compact.show {
    display: flex !important;
}

.register-modal-compact-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(26, 37, 47, 0.3);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideInUp 0.4s ease-out;
    border: 1px solid rgba(211, 186, 112, 0.2);
}

/* Header */
.register-modal-compact-header {
    background: linear-gradient(135deg, #D3BA70 0%, #f4d03f 100%);
    padding: 20px 25px;
    border-radius: 20px 20px 0 0;
    text-align: center;
    position: relative;
}

.register-modal-compact-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(211, 186, 112, 0.1) 0%, rgba(244, 208, 63, 0.1) 100%);
    border-radius: 20px 20px 0 0;
}

.register-modal-compact-title {
    color: #1a252f;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.register-modal-compact-title i {
    font-size: 1.3rem;
    color: #1a252f;
}

.register-modal-compact-subtitle {
    color: rgba(26, 37, 47, 0.8);
    font-size: 0.9rem;
    margin: 5px 0 0 0;
    position: relative;
    z-index: 1;
}

/* Close Button */
.register-modal-compact-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(26, 37, 47, 0.1);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
    font-size: 18px;
    font-weight: bold;
    color: #1a252f;
}

.register-modal-compact-close:hover {
    background: rgba(26, 37, 47, 0.2);
    transform: scale(1.1);
}

.register-modal-compact-close::before {
    content: '×';
    font-size: 20px;
    line-height: 1;
}

/* Body */
.register-modal-compact-body {
    padding: 25px;
}

/* Form Grid */
.register-modal-compact-form {
    display: grid;
    gap: 20px;
}

.register-modal-compact-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.register-modal-compact-row.full {
    grid-template-columns: 1fr;
}

/* Foto de Perfil - Centralizada */
.register-modal-compact-photo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.register-modal-compact-photo-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.register-modal-compact-photo-label {
    color: #1a252f;
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0;
    text-align: center;
}

.register-modal-compact-photo-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #D3BA70;
    display: none;
    box-shadow: 0 4px 15px rgba(211, 186, 112, 0.3);
}

.register-modal-compact-photo-preview.show {
    display: block;
}

.register-modal-compact-photo-btn {
    background: linear-gradient(135deg, #D3BA70 0%, #f4d03f 100%);
    color: #1a252f;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(211, 186, 112, 0.2);
}

.register-modal-compact-photo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(211, 186, 112, 0.4);
}

.register-modal-compact-photo-input {
    display: none;
}

/* Form Groups */
.register-modal-compact-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.register-modal-compact-group.full-width {
    grid-column: 1 / -1;
}

.register-modal-compact-label {
    color: #1a252f;
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0;
}

.register-modal-compact-label.required::after {
    content: ' *';
    color: #e74c3c;
    font-weight: bold;
}

/* Inputs */
.register-modal-compact-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #fff;
    color: #1a252f;
}

.register-modal-compact-input:focus {
    outline: none;
    border-color: #D3BA70;
    box-shadow: 0 0 0 3px rgba(211, 186, 112, 0.1);
    transform: translateY(-1px);
}

.register-modal-compact-input::placeholder {
    color: #a0aec0;
    font-size: 0.9rem;
}

/* Password Input */
.register-modal-compact-password-group {
    position: relative;
}

.register-modal-compact-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.register-modal-compact-password-toggle:hover {
    color: #D3BA70;
}


/* Checkbox de Consentimento LGPD */
.register-modal-compact-consent {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.register-modal-compact-consent-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.register-modal-compact-consent-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #D3BA70;
}

.register-modal-compact-consent-checkbox .consent-text {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #495057;
    flex: 1;
}

.register-modal-compact-consent-checkbox .consent-text a {
    color: #4456A6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.register-modal-compact-consent-checkbox .consent-text a:hover {
    color: #D3BA70;
    text-decoration: underline;
}

/* Buttons */
.register-modal-compact-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.register-modal-compact-btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.register-modal-compact-btn-primary {
    background: linear-gradient(135deg, #D3BA70 0%, #f4d03f 100%);
    color: #1a252f;
}

.register-modal-compact-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(211, 186, 112, 0.4);
}

.register-modal-compact-btn-secondary {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.register-modal-compact-btn-secondary:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

/* Loading State */
.register-modal-compact-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.register-modal-compact-btn.loading i {
    animation: spin 1s linear infinite;
}

/* Error Messages */
.register-modal-compact-error {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}

.register-modal-compact-error.show {
    display: block;
}

/* Success State */
.register-modal-compact-input.success {
    border-color: #27ae60;
    background: rgba(39, 174, 96, 0.05);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 480px) {
    .register-modal-compact {
        padding: 10px;
    }
    
    .register-modal-compact-content {
        max-width: 100%;
        border-radius: 15px;
    }
    
    .register-modal-compact-header {
        padding: 15px 20px;
        border-radius: 15px 15px 0 0;
    }
    
    .register-modal-compact-title {
        font-size: 1.3rem;
    }
    
    .register-modal-compact-body {
        padding: 20px;
    }
    
    .register-modal-compact-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .register-modal-compact-actions {
        flex-direction: column;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .register-modal-compact-content {
        background: rgba(26, 37, 47, 0.95);
        border-color: rgba(211, 186, 112, 0.3);
    }
    
    .register-modal-compact-label {
        color: #f8f9fa;
    }
    
    .register-modal-compact-input {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
        color: #f8f9fa;
    }
    
    .register-modal-compact-input::placeholder {
        color: #a0aec0;
    }
    
    .register-modal-compact-btn-secondary {
        background: rgba(255, 255, 255, 0.1);
        color: #f8f9fa;
        border-color: rgba(255, 255, 255, 0.2);
    }
    
    .register-modal-compact-btn-secondary:hover {
        background: rgba(255, 255, 255, 0.2);
    }
}

/* Success Popup Animation */
.success-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    padding: 30px 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(39, 174, 96, 0.4);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    text-align: center;
    min-width: 300px;
    max-width: 400px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.success-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.success-popup-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: successPulse 2s ease-in-out infinite;
}

.success-popup-icon i {
    font-size: 2.5rem;
    color: white;
    animation: successCheck 0.6s ease-in-out 0.3s both;
}

.success-popup-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.success-popup-message {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
    line-height: 1.4;
}

.success-popup-button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    backdrop-filter: blur(5px);
}

.success-popup-button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Animations */
@keyframes successPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 20px rgba(255, 255, 255, 0);
    }
}

@keyframes successCheck {
    0% {
        transform: scale(0) rotate(45deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(45deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(45deg);
        opacity: 1;
    }
}

@keyframes successSlideIn {
    0% {
        transform: translate(-50%, -50%) scale(0.8) translateY(-50px);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1) translateY(0);
        opacity: 1;
    }
}

.success-popup.show {
    animation: successSlideIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Mobile Responsive for Success Popup */
@media (max-width: 480px) {
    .success-popup {
        min-width: 280px;
        padding: 25px 30px;
        margin: 20px;
    }
    
    .success-popup-icon {
        width: 60px;
        height: 60px;
    }
    
    .success-popup-icon i {
        font-size: 2rem;
    }
    
    .success-popup-title {
        font-size: 1.3rem;
    }
    
    .success-popup-message {
        font-size: 0.9rem;
    }
}
