/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.forgot-password-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #ffffff;
    overflow: hidden;
}

body:not(.forgot-password-page) {
    overflow: auto !important;
}

/* Background */
.forgot-password-wrapper {
    position: relative;
    min-height: 100vh;
    background-image: url('../../public/password_assets/background_password.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden    .forgot-password-container .button-asset,
    .forgot-password-container .action-button {
        max-width: 700px !important;
        height: 160px !important;
    }

    .forgot-password-container .action-button {
        font-size: 36px !important;
        padding: 40px 50px !important;
        letter-spacing: 3px !important;
    }

    .forgot-password-container .button-wrapper {
        max-width: 800px !important;
    }ontainer */
.container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 450px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.forgot-password-container {
    width: 100%;
    max-width: 450px;
    text-align: center;
    position: relative;
}

/* Steps */
.step {
    animation: fadeIn 0.5s ease-in-out;
}

.step[ng-if="true"] {
    display: block !important;
}

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

/* Logo Section */
.logo-section {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    z-index: 3;
}

/* Logo section específico para verificação - reduzir espaçamento */
.step-verification .logo-section {
    margin-bottom: 25px;
}

.logo-container {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

/* Logo container específico para verificação */
.step-verification .logo-container {
    margin-bottom: 15px;
}

.moai-logo {
    height: 160px;
    width: auto;
    filter:
        drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3))
        drop-shadow(0 0 20px rgba(255, 215, 0, 0.2));
    transition: all 0.3s ease;
}

.auth-logo {
    height: 160px;
    width: auto;
    filter:
        drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3))
        drop-shadow(0 0 20px rgba(255, 215, 0, 0.2));
    transition: all 0.3s ease;
}

.logo-container:hover .moai-logo,
.logo-container:hover .auth-logo {
    transform: scale(1.05);
}

/* Page Titles */
.page-title {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FF8C00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 12px;
}

/* Título específico para verificação - reduzir espaçamento */
.step-verification .page-title {
    margin-bottom: 8px;
}

.page-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 30px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.5;
}

/* Subtitle específico para verificação - reduzir espaçamento */
.step-verification .page-subtitle {
    margin-bottom: 20px;
}

.page-subtitle strong {
    color: #FFD700;
    font-weight: 700;
}

/* Success Icon */
.success-icon {
    font-size: 64px;
    margin: 20px 0;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Form Styles */
.forgot-password-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
    position: relative;
    z-index: 3;
    margin-top: 30px;
}

/* Form específico para verificação - reduzir espaçamento */
.step-verification .forgot-password-form {
    gap: 20px;
    margin-top: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.form-label {
    color: #FFD700;
    font-size: 18px;
    font-weight: 700;
    text-align: left;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    padding-left: 8px;
}

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

.input-asset {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    object-fit: contain;
    z-index: 1;
    pointer-events: none;
}

.form-input {
    position: relative;
    width: 100%;
    padding: 18px 24px;
    background: transparent;
    border: none;
    border-radius: 25px;
    color: #8B4513;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: none;
    height: 60px;
    z-index: 2;
    outline: none;
}

.form-input::placeholder {
    color: rgba(139, 69, 19, 0.7);
    font-weight: 500;
    text-align: center;
}

.form-input:focus {
    outline: none;
    color: #8B4513;
}

.form-input:hover {
    color: #8B4513;
}

/* Verification Code Styles */
.verification-code-container {
    margin: 20px 0;
}

/* Container específico para verificação - reduzir espaçamento */
.step-verification .verification-code-container {
    margin: 15px 0;
}

.code-inputs-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    min-height: 100px;
}

/* Wrapper específico para verificação - reduzir espaçamento */
.step-verification .code-inputs-wrapper {
    margin: 15px 0;
    min-height: 80px;
}

.verification-asset {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 400px;
    height: auto;
    object-fit: contain;
    z-index: 1;
    pointer-events: none;
}

.code-inputs {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
    width: 100%;
    max-width: 300px;
    padding: 0 20px;
    margin: 0 auto;
}

.code-input {
    width: 38px;
    height: 48px;
    border: none;
    border-radius: 0;
    background: transparent;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: #8B4513;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: none;
    flex-shrink: 0;
    margin: 0;
}

.code-input:focus {
    background: rgba(139, 69, 19, 0.1);
    color: #8B4513;
    transform: scale(1.05);
}

.code-input:not(:placeholder-shown) {
    color: #8B4513;
}

/* Password Requirements */
.password-requirements {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.requirements-title {
    color: #FFD700;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: left;
}

.requirements-list {
    list-style: none;
    padding: 0;
}

.requirements-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    padding: 5px 0;
}

.requirements-list li.valid {
    color: #32CD32;
}

.requirement-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transition: all 0.3s ease;
}

.requirements-list li.valid .requirement-icon {
    background: #32CD32;
    color: #ffffff;
    transform: scale(1.1);
}

/* Button Styles */
.button-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px auto;
    width: 100%;
    max-width: 350px;
}

/* Button wrapper - maior especificidade para sobrescrever Bootstrap */
.forgot-password-container .button-wrapper {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 30px auto !important;
    width: 100% !important;
    max-width: 900px !important;
}

/* Button wrapper específico para verificação - reduzir espaçamento */
.step-verification .button-wrapper {
    margin: 20px auto !important;
}

/* Botão maior para primeira etapa */
.step-email .button-wrapper {
    max-width: 900px !important;
}

.forgot-password-container .button-asset {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: 800px !important;
    height: 180px !important;
    object-fit: contain !important;
    z-index: 1 !important;
    pointer-events: none !important;
    margin: 0 auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
}

/* Asset igual ao botão de login */
.step-email .button-asset {
    max-width: 800px !important;
    height: 180px !important;
}

.forgot-password-container .action-button {
    position: relative !important;
    width: 100% !important;
    max-width: 800px !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 40px !important;
    color: #8B4513 !important;
    font-size: 44px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    overflow: hidden !important;
    text-transform: uppercase !important;
    letter-spacing: 4px !important;
    box-shadow: none !important;
    height: 180px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 2 !important;
    outline: none !important;
    margin: 0 !important;
    min-width: auto !important;
    line-height: normal !important;
}

/* Remover override para primeira etapa - manter igual ao login */

.forgot-password-container .action-button .button-text {
    color: #8B4513 !important;
    opacity: 1 !important;
    font-weight: 700 !important;
}

.forgot-password-container .action-button .spinner-border-sm {
    border-color: #8B4513 transparent #8B4513 transparent !important;
}

.forgot-password-container .action-button::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent) !important;
    transition: left 0.6s ease !important;
    z-index: -1 !important;
}

.forgot-password-container .action-button:hover .button-asset {
    filter: brightness(1.1) !important;
}

.forgot-password-container .action-button:hover::before {
    left: 100% !important;
}

.forgot-password-container .action-button:active {
    transform: scale(0.98) !important;
}

.forgot-password-container .action-button:disabled {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

.forgot-password-container .action-button:disabled .button-asset {
    filter: brightness(0.8) !important;
}

.forgot-password-container .action-button .button-loader.active {
    opacity: 1 !important;
    animation: spin 1s linear infinite !important;
}

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

/* Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.1em;
    border-style: solid;
    border-color: currentColor transparent currentColor transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

.me-2 {
    margin-right: 0.5rem;
}

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

/* Form Footer */
.form-footer {
    margin-top: 25px;
    position: relative;
    z-index: 3;
}

/* Footer específico para verificação - reduzir espaçamento */
.step-verification .form-footer {
    margin-top: 15px;
}

.links-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.footer-link {
    color: #FFD700;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px 16px;
    border-radius: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-link:hover {
    color: #FFED4E;
    transform: translateY(-2px);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    background: rgba(255, 215, 0, 0.1);
}

.footer-link.primary {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #8B4513;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 20px;
    text-shadow: none;
}

.footer-link.primary:hover {
    background: linear-gradient(135deg, #FFED4E 0%, #FFB347 100%);
    color: #8B4513;
    transform: translateY(-2px) scale(1.05);
}

.footer-link.disabled {
    color: rgba(255, 215, 0, 0.5);
    cursor: not-allowed;
}

.footer-link.disabled:hover {
    transform: none;
    color: rgba(255, 215, 0, 0.5);
    background: none;
}

/* Status Message */
.status-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    animation: slideDown 0.5s ease-out;
}

.status-content {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 215, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.status-content.success {
    border-color: rgba(50, 205, 50, 0.5);
    background: rgba(50, 205, 50, 0.1);
}

.status-content.error {
    border-color: rgba(255, 69, 58, 0.5);
    background: rgba(255, 69, 58, 0.1);
}

.status-icon {
    font-size: 24px;
    animation: statusBounce 1s ease-in-out;
}

.status-text {
    color: rgba(255, 255, 255, 0.95);
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes statusBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-2px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        max-width: 90%;
        padding: 15px;
    }

    .page-title {
        font-size: 24px;
    }

    .page-subtitle {
        font-size: 14px;
    }

    .step-verification .page-subtitle {
        margin-bottom: 15px;
    }

    .code-inputs {
        max-width: 260px;
        padding: 0 15px;
    }

    .code-input {
        width: 32px;
        height: 42px;
        font-size: 20px;
    }

    .verification-asset {
        max-width: 350px;
    }

    .links-container {
        flex-direction: column;
        gap: 10px;
    }

    .moai-logo {
        height: 120px;
    }

    .logo-section {
        margin-bottom: 30px;
    }

    .step-verification .logo-section {
        margin-bottom: 20px;
    }

    .step-verification .form-footer {
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 20px;
    }

    .code-inputs {
        max-width: 220px;
        padding: 0 12px;
    }

    .code-input {
        width: 28px;
        height: 38px;
        font-size: 18px;
    }

    .verification-asset {
        max-width: 300px;
    }

    .forgot-password-container .button-asset,
    .forgot-password-container .action-button {
        max-width: 700px !important;
        height: 160px !important;
    }

    .forgot-password-container .action-button {
        font-size: 36px !important;
        padding: 0 !important;
        letter-spacing: 3px !important;
    }

    .forgot-password-container .button-wrapper {
        max-width: 800px !important;
    }

    .step-verification .button-wrapper {
        margin: 15px auto !important;
    }

    .form-input {
        font-size: 14px;
    }

    .success-icon {
        font-size: 48px;
    }

    .step-verification .logo-section {
        margin-bottom: 15px;
    }

    .step-verification .form-footer {
        margin-top: 8px;
    }
}

/* Auto-focus directive styles */
[auto-focus-first]:focus {
    background: rgba(139, 69, 19, 0.1) !important;
    color: #8B4513 !important;
    transform: scale(1.05) !important;
}

/* Custom animations for success step */
.step-success .success-icon {
    animation: successPulse 2s ease-in-out infinite;
}

@keyframes successPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Media Query adicional para mobile pequeno - dobrado de tamanho */
@media (max-width: 380px) {
    .forgot-password-container .button-asset,
    .forgot-password-container .action-button {
        max-width: 600px !important;
        height: 140px !important;
    }

    .forgot-password-container .action-button {
        font-size: 32px !important;
        padding: 0 !important;
        letter-spacing: 2px !important;
    }

    .forgot-password-container .button-wrapper {
        max-width: 700px !important;
    }
}
