/*
 * Frontend styles for Lovifys OTP Login Pro
 *
 * Styles target the login, OTP and signup screens to provide a clean, modern UI inspired by native mobile apps.
 */

.lovifys-otp-container {
    max-width: 420px;
    margin: 2rem auto;
    padding: 1rem;
    box-sizing: border-box;
    position: relative;
}

.lovifys-screen {
    display: none;
    padding: 2rem 1rem 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}
.lovifys-screen.active {
    display: block;
}

.lovifys-icon-wrapper {
    text-align: center;
    font-size: 48px;
    color: #fe3285;
    margin-bottom: 1rem;
}

.lovifys-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0.5rem 0;
}

.lovifys-subtitle {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    margin: 0 0 1.5rem;
}

/* Input group for phone */
.lovifys-input-group {
    display: flex;
    align-items: center;
    border: 1px solid #fe3285;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}
.lovifys-country-code {
    padding: 0.75rem 0.75rem;
    background-color: rgba(254, 50, 133, 0.05);
    color: #fe3285;
    border-right: 1px solid #fe3285;
    font-weight: 600;
    flex: 0 0 auto;
}
.lovifys-input {
    flex: 1;
    padding: 0.75rem;
    border: none;
    outline: none;
    font-size: 1rem;
    color: inherit;
    background-color: transparent;
}

/* Generic button */
.lovifys-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    text-align: center;
    border: none;
    cursor: pointer;
    margin-bottom: 1rem;
    transition: opacity 0.2s ease;
}
.lovifys-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

/* Divider with OR */
.lovifys-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin-bottom: 1rem;
}
.lovifys-divider::before,
.lovifys-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e0e0e0;
}
.lovifys-divider:not(:empty)::before {
    margin-right: 0.5em;
}
.lovifys-divider:not(:empty)::after {
    margin-left: 0.5em;
}

/* Google button */
.lovifys-google {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid;
    font-weight: 500;
}
.lovifys-google i {
    margin-right: 0.5rem;
    font-size: 1.2rem;
    color: #4285f4;
}

.lovifys-terms {
    font-size: 0.75rem;
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 0;
}
.lovifys-terms a {
    color: #fe3285;
    text-decoration: none;
}
.lovifys-terms a:hover {
    text-decoration: underline;
}

/* OTP inputs */
.lovifys-otp-inputs {
    display: flex;
    justify-content: space-between;
    margin: 1rem 0;
}
.lovifys-otp-box {
    width: 14%;
    padding: 0.75rem 0;
    border: 1px solid #fe3285;
    border-radius: 8px;
    text-align: center;
    font-size: 1.2rem;
    outline: none;
}
.lovifys-resend {
    text-align: center;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    color: #666;
}
.lovifys-resend span {
    color: #fe3285;
    font-weight: 600;
}

/* Signup inputs with icons */
.lovifys-input-icon-group {
    display: flex;
    align-items: center;
    border: 1px solid #fe3285;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}
.lovifys-input-icon-group i {
    padding: 0.75rem;
    color: #fe3285;
    border-right: 1px solid #fe3285;
    flex: 0 0 auto;
}
.lovifys-input-icon-group .lovifys-input {
    border: none;
    padding: 0.75rem;
    flex: 1;
}

.lovifys-terms-checkbox {
    font-size: 0.8rem;
    margin-bottom: 1rem;
}
.lovifys-terms-checkbox label {
    display: flex;
    align-items: center;
    cursor: pointer;
}
.lovifys-terms-checkbox input {
    margin-right: 0.4rem;
}
.lovifys-terms-checkbox a {
    color: #fe3285;
    text-decoration: none;
}
.lovifys-terms-checkbox a:hover {
    text-decoration: underline;
}

/* Back arrow */
.lovifys-back {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 1.2rem;
    cursor: pointer;
    color: #fe3285;
}

/* Loader overlay */
.lovifys-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.lovifys-loader.hidden {
    display: none;
}
.lovifys-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #fe3285;
    border-top-color: transparent;
    border-radius: 50%;
    animation: lovifys-spin 1s linear infinite;
}
@keyframes lovifys-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast notification */
.lovifys-toast {
    position: fixed;
    top: 58%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #333;
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    max-width: calc(100vw - 2rem);
    width: max-content;
    min-width: 180px;
    text-align: center;
    pointer-events: none;
}
.lovifys-toast.show {
    opacity: 1;
}
.lovifys-toast-spinner {
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255, 255, 255, 0.55);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lovifys-spin 0.8s linear infinite;
    flex: 0 0 auto;
}
.lovifys-toast-text {
    display: inline-block;
    line-height: 1.35;
}