/* ============================================================
   Phone Verification Form
   ============================================================ */

.pv-form {
    --pv-red: #C00;
    --pv-dark: #262322;
    --pv-bg: #F6F4F3;
    --pv-radius: 12px;
    --pv-green: #2e7d32;

    max-width: 420px;
    margin: 0 auto;
    font-family: inherit;
}

/* Steps */
.pv-step {
    display: none;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .3s ease, transform .3s ease;
}

.pv-step.pv-step-active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: pvFadeIn .35s ease forwards;
}

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

/* Header */
.pv-header {
    text-align: center;
    margin-bottom: 8px;
}

.pv-header h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--pv-dark);
    margin: 0 0 4px;
}

.pv-header p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Form group */
.pv-field {
    margin: 18px 0;
}

.pv-field label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--pv-dark);
    margin-bottom: 6px;
}

.pv-field input {
    width: 100%;
    padding: 12px 14px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: var(--pv-radius);
    outline: none;
    transition: border-color .2s;
    box-sizing: border-box;
    background: #fff;
}

.pv-field input:focus {
    border-color: var(--pv-red);
}

/* Code input - larger, spaced */
.pv-field .pv-input-code {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 8px;
    padding: 14px;
}

/* Buttons */
.pv-btn {
    display: block;
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 800;
    border: none;
    border-radius: var(--pv-radius);
    cursor: pointer;
    transition: background .2s, transform .15s, opacity .2s;
    text-align: center;
}

.pv-btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.pv-btn:disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
}

.pv-btn-primary {
    background: var(--pv-red);
    color: #fff;
}

.pv-btn-primary:hover:not(:disabled) {
    background: #a00;
}

.pv-btn-success {
    background: var(--pv-green);
    color: #fff;
}

/* Links row */
.pv-links {
    display: flex;
    justify-content: space-between;
    margin-top: 14px;
}

.pv-link {
    background: none;
    border: none;
    color: var(--pv-red);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.pv-link:hover {
    color: #a00;
}

.pv-link:disabled {
    color: #999;
    cursor: not-allowed;
    text-decoration: none;
}

/* Message */
.pv-message {
    display: none;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 14px;
    text-align: center;
}

.pv-msg-error {
    background: #fde8e8;
    color: #b71c1c;
}

.pv-msg-success {
    background: #e8f5e9;
    color: #2e7d32;
}

.pv-msg-info {
    background: #e3f2fd;
    color: #1565c0;
}

/* Loading step */
.pv-step-loading .pv-header h3::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 3px solid #ddd;
    border-top-color: var(--pv-red);
    border-radius: 50%;
    animation: pvSpin .6s linear infinite;
    vertical-align: middle;
}

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

/* Phone display in step 2 */
.pv-phone-display {
    font-weight: 800;
    color: var(--pv-dark);
}

/* Success step */
.pv-success-check {
    text-align: center;
    font-size: 28px;
    margin-bottom: 6px;
    color: var(--pv-green);
}

.pv-step-success h3 {
    text-align: center;
    color: var(--pv-green);
}

.pv-step-success p {
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* ============================================================
   Modal overlay
   ============================================================ */
.pv-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.pv-modal-overlay.pv-modal-open {
    display: flex;
}

.pv-modal-box {
    background: #fff;
    border-radius: 16px;
    padding: 32px 28px;
    width: 90%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    animation: pvModalIn .3s ease;
}

@keyframes pvModalIn {
    from { opacity: 0; transform: scale(.92) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.pv-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    padding: 4px;
}

.pv-modal-close:hover {
    color: #333;
}

/* Override form width inside modal */
.pv-modal-box .pv-form {
    max-width: 100%;
}

/* Mobile fixes */
@media (max-width: 480px) {
    .pv-modal-box {
        width: 95%;
        padding: 24px 18px;
        border-radius: 12px;
        max-height: 85vh;
    }

    .pv-field input {
        font-size: 16px; /* prevents iOS zoom on focus */
    }

    .pv-field .pv-input-code {
        font-size: 24px;
        letter-spacing: 6px;
    }

    .pv-btn {
        padding: 16px;
        font-size: 16px;
    }

    .pv-modal-close {
        top: 8px;
        right: 10px;
        font-size: 26px;
        padding: 8px;
    }
}

/* Prevent body scroll when modal is open */
body.pv-modal-body-lock {
    overflow: hidden;
    position: fixed;
    width: 100%;
}
