/*
    Estilos para OTP
*/

.phone-input {
    padding-left: 16px;
    height: 47px !important;
    width: 100% !important;
    border-radius: 4px;
}

.phone-group {
    display: flex !important;
    align-items: center !important;
    height: 49px !important;
    box-shadow: 0px 1px 2px 0px #4D40551A;
    border: 1px solid #E2E2E2 !important;
    border-radius: 4px;
    text-align: left;
    color: #0C111D;
}

.phone-group .phone-input {
    border: 0 !important;
    z-index: 1 !important;
    width: 100% !important;
}

.phone-group .form-control {
    border: none !important;
    box-shadow: none !important;
}

.country-prefix {
    display: flex !important;
    align-items: center !important;
    justify-content: left !important;
    height: 47px !important;
    padding: 0 !important;
    position: relative !important;
    min-width: 90px;  
    background-color: #FFFFFF;
    border: none;
    border-right: 1px solid #E2E2E2 !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.phone-arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #4a4a4a;
    font-size: 16px;
}

/* Dropdown oculto */
.country-dropdown {
    display: none;
    position: absolute;
    top: 47px;
    left: 0;
    background: #fff;
    border-radius: 6px;
    padding: 0;
    width: 100%;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    z-index: 99 !important;
    list-style: none !important;
    max-height: 280px;
    overflow-y: auto;
}

.country-search-wrapper {
    position: sticky;
    top: 0;
    z-index: 10;
    width: 100%;
    box-sizing: border-box;
    background: #fff;
    padding: 10px 14px;
    border-bottom: 1px solid #E4E7EC;
}

.country-search {
    display: flex;
    align-items: center;
    width: 100%;
    background: #fff;
    border: 1px solid #D0D5DD;
    border-radius: 5px;
}

.country-search input {
    width: 100% !important;
    flex: 1 1 auto;
    pointer-events: auto;
    min-width: 0;
    padding: 8px 32px 8px 12px;
    border-radius: 8px;
    border: none !important;
    height: auto !important;
    outline: none;
}

.country-search i {
    position: absolute;
    flex: 0 0 auto; 
    right: 32px;
    color: #98A2B3;
    pointer-events: none;
}

.country-dropdown li {
    display: flex;
    align-items: center;
    padding: 4px 26px;
    cursor: pointer;
    font-size: 12px;
    color: #0C111D;
    font-weight: 400;
    gap: 10px;
    min-height: 40px;
}

.country-dropdown li.country-search-wrapper {
    cursor: default;
    min-height: unset;
    padding: 6px 20px;
}

.country-dropdown li.country-search-wrapper:hover {
    background: #fff;
}

.country-search:hover,
.country-search:focus-within {
    background-color: #fff;
}

.country-search input:focus {
    outline: none;
    box-shadow: none;
}

.country-dropdown li span {
    flex: 1;
}

.country-dropdown li:hover {
    background: #f0f0f0;
}

/* Mostrar lista */
.country-dropdown.show {
    display: block !important;
}

[data-otp="submit"].disabled {
    opacity: 0.5 !important;
    pointer-events: none !important;
    cursor: not-allowed;
}

.phone-validation {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 10px;
    color: #777;
}

.status-text {
  display: inline-flex;
  align-items: flex-start;
  gap: 4px;
  font-size: 12px;
  line-height: 1.2;
  font-family: inherit;
  color: #545961;
  text-align: left;
  padding-left: 3px;
}

.status-text svg{
  flex: 0 0 auto;
  display: block;
  margin-top: 1px;
}

.status-text.error {
  color: #dd1212;
}

.phone-wrapper {
    position: relative;
    flex: 1;
}

.phone-wrapper .otp-button{
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 25px;
    height: 25px;
    border: 0;
    border-radius: 6px;
    background: #F4A23A;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 17px;
    line-height: 1;
    z-index: 2;
}

.phone-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 18px;
    color: #FFAA2E;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #FFAA2E;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    z-index: 1;
}

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

.check i {
    color: #FFAA2E;
}

.country-selected {
    display: flex;
    align-items: center;
    margin-left: 12px;
    gap: 6px;
    font-weight: 400;
}

.flag {
    width: 18px;
    height: 12px;
    object-fit: cover;
}

.country-dropdown .no-results {
    text-align: center;
    font-size: 12px;
    color: #667085;
    padding: 6px 32px;
    cursor: default;
}

.country-dropdown li.no-results {
    display: block;
    min-height: unset;
    gap: 0;

    cursor: default;
    pointer-events: none;

    background: transparent;
}

.otp-container {
    text-align: center;
    transition: max-height 0.25s ease, padding 0.25s ease;
}

.otp-label {
    font-size: 12px;
    line-height: 1;
    text-align: center;
    color: #545961;
    margin-bottom: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.otp-label img {
    width: 16px;
}

.otp-inputs {
    display: flex;
    justify-content: center;
    gap: 13px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.otp-inputs input {
    height: 46px;
    width: 47px;
    border-radius: 8px;
    border: 2px solid #E0E0E0 !important;
    background: #fff;
    text-align: center;
    font-family: inherit;
    font-size: 16px;
    outline: none;
}

@media (max-width: 768px) {
    .otp-container {
        display: flex;
        flex-direction: column;
        gap: 20px;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        z-index: 1000;
        padding: 30px 20px 30px;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -8px 10px rgba(0, 0, 0, 0.15);
    }

    .otp-backdrop {
        position: fixed;
        inset: 0;
        z-index: 998;

        background: #ffffffba;
        /* backdrop-filter: blur(4px) saturate(0.9); */
    }

    .otp-backdrop.hide {
        display: none;
    }

    .fa-whatsapp {
        color: #1a9b4a;
    }

    .otp-inputs input {
        height: 46px;
        max-width: 47px;
        font-size: 16px;
    }
}

@media (max-width: 360px) {
    .otp-inputs {
        gap: 10px;
    }

    .otp-inputs input {
        width: 40px !important;;
        height: 40px !important;
        font-size: 15px !important;;
    }
}

/* @media (max-width: 360px) {
    .otp-inputs {
        gap: 8px;
    }

    .otp-inputs input {
        width: 36px !important;;
        height: 36px !important;;
        font-size: 14px !important;;
    }
} */

.otp-inputs input:focus {
  border-color: #F4A23A !important;
  box-shadow: 0 0 0 2px rgba(244, 162, 58, 0.2);
}

.otp-inputs input.is-valid {
  border: 1px solid #7ECA6B !important;
  box-shadow: inset 0 0 4.8px rgba(0, 0, 0, 0.25);
}

.otp-inputs input.is-error {
  border: 1px solid #F04438 !important;
  box-shadow: none;
}

.otp-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.otp-alt,
.otp-resend {
    background: none;
    border: none;
    padding: 0;
    font-size: 12px;
    color: #ffaa2e;
    cursor: pointer;
    text-decoration: underline;
    white-space: nowrap;
}

.otp-disabled {
    pointer-events: none;
    opacity: 0.4;
    cursor: not-allowed;
    text-decoration: none;
}

.otp-alt:hover {
    text-decoration: underline;
}

.otp-message {
    font-size: 12px;
    text-align: left;
}

.otp-container .otp-message.error {
    color: #F04438 !important;; /* rojo */
    position: static !important;
    padding: 0 !important;
}

.otp-message.info {
    color: #333333; /* neutro */
}

.otp-container.is-locked {
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
}

.otp-container.is-locked .otp-label,
.otp-container.is-locked .otp-inputs,
.otp-container.is-locked .otp-actions {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    transition: all 0.25s ease;
}

.otp-label,
.otp-inputs,
.otp-actions {
    transition: all 0.25s ease;
}

.phone-wrapper .edit-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 10px;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 1px solid #f4a23a;
    background: #fff;
    color: #f4a23a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
}

.phone-wrapper .edit-button i{
    font-size: 12px;
    line-height: 1;
}

.phone-group.is-disabled input,
.phone-group.is-disabled .country-prefix {
    opacity: 0.6;
    pointer-events: none;
}

.phone-group.is-disabled .edit-button {
    opacity: 1;
    pointer-events: auto;
}

.otp-timer {
    text-align: left;
}

.otp-channel-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.otp-channel-header {
    text-align: center;
}

.otp-channel-msg {
    font-size: 12px;
    font-weight: 400;
    margin: 0;
}

.otp-channel-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.otp-channel-btn {
    background: #102A56;
    color: #fff;
    border-radius: 6px;
    padding: 12px 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
    border: none;
    white-space: nowrap;
    min-width: 44%;
    justify-content: center;
}

.otp-channel-btn img {
    width: 16px;
    height: 16px;
}

.otp-form .source-phone {
    display: none !important;
}

.otp-bank-form .otp-block {
    width: 42%;
}

.otp-bank-form .phone-validation {
    margin-top: 16px;
}