/**
 * Signup Wizard — Estilos complementares
 *
 * O grosso do design vem dos 3 CSS PUCO (style_01/02/03.css).
 * Este arquivo complementa com: step show/hide, landing page,
 * animações, dropdown custom e responsive tweaks.
 */

/* =========================================================================
   GLOBAL / BODY
   ========================================================================= */

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
}

/* =========================================================================
   STEP SHOW/HIDE + TRANSITIONS
   ========================================================================= */

.signup-step {
    display: none;
    opacity: 0;
    transition: opacity 0.25s ease-in-out;
}

.signup-step--active {
    display: block;
    opacity: 1;
}

.signup-step--leaving {
    display: block;
    opacity: 0;
}

/* =========================================================================
   STEP 1: LANDING PAGE
   ========================================================================= */

.signup-landing {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-image: url('/assets/app/img/desktop-bg.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    padding: 20px;
    overflow: hidden;
}

.signup-landing__logo {
    margin-bottom: 32px;
}

.signup-landing__logo-img {
    max-height: 48px;
    width: auto;
}

.signup-landing__card {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px 48px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

.signup-landing__title {
    font-size: 24px;
    font-weight: 700;
    color: #192435;
    text-align: center;
    margin: 0 0 8px 0;
}

.signup-landing__subtitle {
    font-size: 14px;
    color: #656e7a;
    text-align: center;
    margin: 0 0 28px 0;
}

.signup-landing__form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.signup-landing__terms {
    margin-top: 4px;
}

/* =========================================================================
   CHECKBOX (custom)
   ========================================================================= */

.signup-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.4;
}

.signup-checkbox input[type="checkbox"] {
    display: none;
}

.signup-checkbox__mark {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 2px solid #c4cad2;
    border-radius: 4px;
    display: inline-block;
    position: relative;
    margin-top: 1px;
    transition: all 0.15s;
}

.signup-checkbox input:checked + .signup-checkbox__mark {
    background: #017737;
    border-color: #017737;
}

.signup-checkbox input:checked + .signup-checkbox__mark::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* =========================================================================
   EMAIL IN USE (inline message)
   ========================================================================= */

.signup-email-in-use {
    background: #fff3cd;
    border-left: 3px solid #ffc107;
    padding: 10px 14px;
    border-radius: 0 4px 4px 0;
}

/* =========================================================================
   SELECT (dropdown custom via native select)
   ========================================================================= */

.signup-select {
    width: 100%;
    height: 48px;
    border: none;
    background: transparent;
    font-size: 15px;
    color: #192435;
    outline: none;
    cursor: pointer;
    padding: 0 8px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='%23192435'%3E%3Cpath d='M6.163 5.148a.673.673 0 0 1 .95-.951l3.323 3.328a.673.673 0 0 1 0 .95l-3.323 3.328a.671.671 0 1 1-.95-.95L9.012 8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.signup-select option {
    color: #192435;
}

.signup-select option[value=""] {
    color: #656e7a;
}

/* =========================================================================
   FIELD ERRORS
   ========================================================================= */

.signup-field-error {
    color: #dc3545 !important;
    margin-top: 4px;
}

/* =========================================================================
   INVITE ROWS
   ========================================================================= */

.invite-row {
    margin-bottom: 4px;
}

/* =========================================================================
   LOADING ANIMATION (step 6)
   ========================================================================= */

@keyframes signupLoadingBounce1 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes signupLoadingBounce2 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes signupLoadingBounce3 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes signupLoadingBounce4 {
    0%, 100% { transform: translateY(0) rotate(4deg); }
    50% { transform: translateY(-10px) rotate(-4deg); }
}

.signup-loading-box--1 {
    animation: signupLoadingBounce1 1.2s ease-in-out infinite;
}

.signup-loading-box--2 {
    animation: signupLoadingBounce2 1.4s ease-in-out infinite 0.2s;
}

.signup-loading-box--3 {
    animation: signupLoadingBounce3 1.1s ease-in-out infinite 0.4s;
}

.signup-loading-box--4 {
    animation: signupLoadingBounce4 1.5s ease-in-out infinite 0.1s;
}

/* =========================================================================
   OTP CODE INPUT FIXES
   ========================================================================= */

.verify-email_codeInput__YviH0 {
    -moz-appearance: textfield;
}

.verify-email_codeInput__YviH0::-webkit-outer-spin-button,
.verify-email_codeInput__YviH0::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.verify-email_codeError__tmVPR {
    display: none;
    width: 100%;
    text-align: center;
    margin-top: 8px;
    font-size: 13px;
    color: #dc3545;
}

.verify-email_codeError__tmVPR:not(:empty) {
    display: block;
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */

@media (max-width: 640px) {
    .signup-landing__card {
        padding: 28px 24px;
        margin: 0 8px;
    }

    .signup-landing__title {
        font-size: 20px;
    }

    .Layout_wrapper__KTuKS {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .Stepper_stepper__frmxS {
        transform: scale(0.85);
        transform-origin: center top;
    }
}

@media (max-width: 420px) {
    .verify-email_codeInput__YviH0 {
        width: 40px;
        height: 44px;
        font-size: 20px;
    }

    .signup-landing__card {
        padding: 24px 16px;
    }
}

/* =========================================================================
   BUTTON DISABLED STATE FIX
   ========================================================================= */

.puco-button--disabled {
    opacity: 0.6;
    pointer-events: none;
}

/* Verified email suffix text */
.Input_verifiedEmailText__2zsdO {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #017737;
    font-size: 13px;
    font-weight: 500;
}

/* =========================================================================
   RESEND LINK STATES
   ========================================================================= */

/* Default: only show .resend-link__label */
.resend-link__loading,
.resend-link__success,
.resend-link__cooldown {
    display: none;
}

.resend-link__label,
.resend-link__loading,
.resend-link__success,
.resend-link__cooldown {
    align-items: center;
    gap: 4px;
}

/* Loading state */
.resend-link--loading .resend-link__label { display: none; }
.resend-link--loading .resend-link__loading {
    display: inline-flex;
    color: #6b7280;
}
.resend-link--loading {
    pointer-events: none;
    color: #6b7280 !important;
}

/* Spinner animation */
.resend-spinner {
    vertical-align: -2px;
}

/* Success state */
.resend-link--success .resend-link__label { display: none; }
.resend-link--success .resend-link__success {
    display: inline-flex;
    color: #017737;
}
.resend-link--success {
    pointer-events: none;
    color: #017737 !important;
}

/* Cooldown state */
.resend-link--cooldown .resend-link__label { display: none; }
.resend-link--cooldown .resend-link__cooldown {
    display: inline;
    color: #9ca3af;
}
.resend-link--cooldown {
    pointer-events: none;
    color: #9ca3af !important;
    text-decoration: none !important;
}

/* =========================================================================
   RESEND FEEDBACK BANNER
   ========================================================================= */

.resend-feedback {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 12px;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    max-height: 0;
    overflow: hidden;
}

.resend-feedback--visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    max-height: 60px;
    padding: 10px 16px;
}

.resend-feedback--success {
    background: #ecfdf5;
    color: #017737;
    border: 1px solid #a7f3d0;
}

.resend-feedback--error {
    background: #fef2f2;
    color: #dc3545;
    border: 1px solid #fecaca;
}

/* =========================================================================
   CUSTOM DROPDOWN COMPONENT
   ========================================================================= */

.signup-dropdown {
    position: relative;
}

/* Trigger overrides */
.signup-dropdown__trigger {
    cursor: pointer;
    min-height: 48px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.signup-dropdown__trigger:focus {
    outline: none;
    border-color: #017737;
    box-shadow: 0 0 0 1px #017737;
}

/* Error state for dropdown trigger */
.signup-dropdown--error .signup-dropdown__trigger {
    border-color: #dc3545 !important;
    box-shadow: none !important;
}

.signup-dropdown--error .signup-dropdown__trigger:focus {
    box-shadow: 0 0 0 1px #dc3545 !important;
}

/* Label states */
.signup-dropdown__label {
    color: #656e7a;
    font-size: 15px;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.signup-dropdown__label--selected {
    color: #192435;
}

/* Chevron rotation */
.signup-dropdown__chevron {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.signup-dropdown--open .signup-dropdown__chevron {
    transform: rotate(90deg);
}

/* Dropdown panel */
.signup-dropdown__panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 100;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    max-height: 240px;
    overflow-y: auto;
    padding: 4px 0;
}

/* Options */
.signup-dropdown__option {
    padding: 10px 16px;
    font-size: 15px;
    color: #192435;
    cursor: pointer;
    transition: background-color 0.1s;
    user-select: none;
}

.signup-dropdown__option:hover,
.signup-dropdown__option--focused {
    background-color: #f0f8f4;
}

.signup-dropdown__option--selected {
    background-color: #e8f5ee;
    font-weight: 500;
    color: #017737;
}

/* Drop-up mode: panel opens above the trigger */
.signup-dropdown--drop-up .signup-dropdown__panel {
    top: auto;
    bottom: calc(100% + 4px);
}

/* Country code dropdown tweaks */
.signup-dropdown--country-code .signup-dropdown__panel {
    min-width: 160px;
    right: auto;
}

/* =========================================================================
   INFO MESSAGE (privacy box, green)
   ========================================================================= */

.CombinedDropdown_infoMessage__kclTj {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #e8f5ee;
    border-radius: 8px;
    padding: 12px 16px;
}

.CombinedDropdown_infoMessage__kclTj .puco-icon {
    margin-top: 2px;
}

/* =========================================================================
   DROPDOWN TRIGGER ERROR STATE (for puco-input-dropdown-trigger)
   ========================================================================= */

.puco-input-dropdown-trigger--error {
    border-color: #dc3545 !important;
}

/* =========================================================================
   PASSWORD STRENGTH INDICATOR
   ========================================================================= */

.PasswordInfo_passwordStrength__3WSPa {
    position: relative;
}

.password-strength__success {
    color: rgb(101, 110, 122);
}

/* Keep label + ⓘ icon together (prevent line break) */
.pw-strength-badge {
    white-space: nowrap;
    display: inline;
}

.pw-strength-badge strong {
    color: #017737;
}

.pw-tooltip-trigger {
    display: inline;
    vertical-align: middle;
    margin-left: 2px;
}

.pw-tooltip-trigger svg {
    width: 16px !important;
    min-width: 16px !important;
    height: 16px !important;
}

/* =========================================================================
   PASSWORD TOOLTIP (Pipedrive style, dark)
   ========================================================================= */

.pw-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    z-index: 200;
    width: max-content;
    max-width: 340px;
}

.pw-tooltip__content {
    background: #192435;
    color: #fff;
    border-radius: 8px;
    padding: 14px 18px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    position: relative;
}

/* Tail / arrow pointing down */
.pw-tooltip__content::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 20px;
    width: 10px;
    height: 10px;
    background: #192435;
    transform: rotate(45deg);
    border-radius: 0 0 2px 0;
}

/* Title + subtitle spacing */
.pw-tooltip__content > p:first-child {
    margin-bottom: 2px;
}

/* Hints list */
.pw-tooltip__hints {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pw-tooltip__hint {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 22px;
}

.pw-tooltip__check {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

/* Unmet: bold text, no check */
.pw-tooltip__hint-text {
    font-weight: 700;
    color: #fff;
    font-size: 13px;
    line-height: 1.3;
    margin: 0;
}

/* Met: normal weight, with check */
.pw-tooltip__hint--met .pw-tooltip__hint-text {
    font-weight: 400;
    color: rgba(255, 255, 255, 0.75);
}

.pw-tooltip__hint--met .pw-tooltip__check {
    display: inline-block !important;
}

/* Add left padding when no check (unmet) to align text */
.pw-tooltip__hint:not(.pw-tooltip__hint--met) {
    padding-left: 20px;
}
