/* SharpFlow AI - Register Styles */

.register-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--header-height));
    padding: calc(var(--header-height) + 40px) 0 60px;
}

.register-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    background: rgba(3, 0, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 2.5rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    position: relative;
    overflow: hidden;
    animation: fade-in 0.5s ease-out;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Subtle top highlight */
.register-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.5), transparent);
}

.register-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.register-title {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #fff, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.register-subtitle {
    color: #9ca3af;
    font-size: 0.95rem;
    line-height: 1.5;
}

.form-row {
    display: flex;
    gap: 1.25rem;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    color: #e5e7eb;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    margin-left: 0.25rem;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 1.2rem;
    pointer-events: none;
    transition: color 0.2s ease;
}

.form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    color: #fff;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: #8B5CF6;
    background: rgba(139, 92, 246, 0.05);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

.form-control:focus + .input-icon {
    color: #8B5CF6;
}

.form-control::placeholder {
    color: #4b5563;
}

.btn--full {
    width: 100%;
    margin-top: 1.5rem;
    padding: 1rem;
    font-size: 1rem;
    border-radius: 12px;
}

.register-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #9ca3af;
    font-size: 0.9rem;
}

.register-footer a {
    color: #8B5CF6;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.register-footer a:hover {
    color: #a78bfa;
    text-decoration: underline;
}

/* Alert Messages */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
    animation: shake 0.4s ease-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

.alert i {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.alert ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.alert ul li {
    margin-bottom: 0.25rem;
}

.alert ul li:last-child {
    margin-bottom: 0;
}

.alert--error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert--error i {
    color: #ef4444;
}

.alert--success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

.alert--success i {
    color: #22c55e;
}

/* Form states */
.form-control.is-invalid {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.form-control.is-valid {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.05);
}

/* Button loading state */
.btn--loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn--loading .btn-text {
    visibility: hidden;
}

.btn--loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ============================================
   INTL-TEL-INPUT - Dark Theme Override
   ============================================ */

/* Container do telefone - remove padding-left do ícone */
.input-wrapper--phone .form-control {
    padding-left: 1rem;
}

/* Container principal do intl-tel-input */
.input-wrapper--phone .iti {
    width: 100%;
}

/* Input do telefone quando dentro do iti */
.input-wrapper--phone .iti input.form-control {
}

/* Botão do país (bandeira + código) */
.iti__selected-country {
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 10px 0 0 10px !important;
    padding: 0 8px 0 12px !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.iti__selected-country:hover {
    background: rgba(139, 92, 246, 0.1) !important;
}

/* Código do país */
.iti__selected-dial-code {
    color: #9ca3af !important;
    font-size: 0.9rem !important;
    margin-left: 6px !important;
}

/* Seta dropdown */
.iti__arrow {
    border-top-color: #6b7280 !important;
    margin-left: 6px !important;
}

.iti__arrow--up {
    border-bottom-color: #6b7280 !important;
}

/* Dropdown de países */
.iti__country-list {
    background: #1a1625 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
    max-height: 250px !important;
    margin-top: 4px !important;
    z-index: 100 !important;
}

/* Scrollbar do dropdown */
.iti__country-list::-webkit-scrollbar {
    width: 6px;
}

.iti__country-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.iti__country-list::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.5);
    border-radius: 3px;
}

/* Item do país no dropdown */
.iti__country {
    padding: 10px 12px !important;
    color: #e5e7eb !important;
    transition: background 0.15s ease !important;
}

.iti__country:hover {
    background: rgba(139, 92, 246, 0.15) !important;
}

.iti__country.iti__highlight {
    background: rgba(139, 92, 246, 0.2) !important;
}

/* Nome do país */
.iti__country-name {
    color: #e5e7eb !important;
    margin-right: 8px !important;
}

/* Código do país no dropdown */
.iti__dial-code {
    color: #6b7280 !important;
}

/* Divisor entre países preferidos e todos */
.iti__divider {
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
    margin: 4px 0 !important;
}

/* Campo de busca de países */
.iti__search-input {
    background: #1a1625 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    color: #fff !important;
    padding: 8px 12px !important;
    margin: 8px !important;
    width: calc(100% - 16px) !important;
}

.iti__search-input:focus {
    outline: none !important;
    border-color: #8B5CF6 !important;
}

.iti__search-input::placeholder {
    color: #6b7280 !important;
}

/* Bandeira */
.iti__flag {
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Estados de validação no container do telefone */
.input-wrapper--phone .iti input.form-control.is-invalid {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.input-wrapper--phone .iti input.form-control.is-valid {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.05);
}

/* Focus state */
.input-wrapper--phone .iti input.form-control:focus {
    outline: none;
    border-color: #8B5CF6;
    background: rgba(139, 92, 246, 0.05);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

/* Mobile fullscreen popup */
.iti--fullscreen-popup .iti__country-list {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 90vw !important;
    max-width: 400px !important;
    max-height: 70vh !important;
    border-radius: 16px !important;
}

/* Mobile responsiveness */
@media (max-width: 640px) {
    .register-container {
        padding: 1.5rem;
        margin: 0 1rem;
        border-radius: 20px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .register-title {
        font-size: 1.75rem;
    }

    .alert {
        padding: 0.875rem 1rem;
        font-size: 0.85rem;
    }
}
