@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&display=swap');

:root {
    --input-bg: #ffffff;
    --input-border: #e5e7eb;
    --input-focus-border: #26a50a;

    --text-dark: #0f172a;
    --text-placeholder: #9ca3af;

    --error-bg: rgba(239, 68, 68, 0.08);
    --error-border: #ef4444;
    --success-bg: rgba(38, 165, 10, 0.08);
    --success-border: #26a50a;

    --form-radius: 6px;
    --form-anim: 0.3s ease;
}

/* =============================
   FORM CONTAINER
   ============================= */
._form.form {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 10px 0;
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    text-align: center;
    background: transparent;
}

._form .form-group {
    width: 100%;
    margin-bottom: 16px;
    text-align: left;
    position: relative;
}

/* =============================
   INPUTS
   ============================= */
._form input {
    width: 100%;
    height: 44px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 400;
    color: var(--text-dark);
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--form-radius);
    outline: none;
    transition: all var(--form-anim);
    box-sizing: border-box;
    font-family: inherit;
    box-shadow: none;
}

._form input::placeholder {
    color: var(--text-placeholder);
    opacity: 1;
    font-weight: 400;
}

._form input:focus {
    border-color: var(--input-focus-border);
    box-shadow: 0 0 0 2px rgba(38, 165, 10, 0.2);
}

/* =============================
   VALIDATION
   ============================= */
._form input.correct,
._form input.valid {
    background: var(--success-bg) !important;
    border-color: var(--success-border) !important;
    box-shadow: none !important;
}

._form input.error,
._form input.invalid {
    background: var(--error-bg) !important;
    border-color: var(--error-border) !important;
    box-shadow: none !important;
}

._form label.error {
    display: none !important;
}

/* =============================
   PHONE (INTL-TEL-INPUT)
   ============================= */
._form .iti {
    width: 100%;
    display: block;
}

._form input[type="tel"] {
    padding-left: 85px !important;
}

.iti__selected-dial-code {
    color: var(--text-dark) !important;
    font-weight: 500;
}

.iti__country-list {
    background-color: #fff;
    border: 1px solid var(--input-border);
    color: #333;
    border-radius: 6px;
    white-space: normal;
    width: 300px;
    max-width: 85vw;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.iti__country {
    padding: 8px 12px;
    font-size: 14px;
}

.iti__country.iti__highlight {
    background-color: rgba(38, 165, 10, 0.1);
}

.iti__divider {
    border-bottom-color: var(--input-border);
}

/* =============================
   BUTTON (REG-BTN)
   ============================= */
._form .reg-btn {
    width: 100%;
    height: 54px;
    padding: 14px 28px;
    margin-top: 8px;
    background: #26a50a;
    color: white;
    border: none;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
}

._form .reg-btn:hover:not(:disabled) {
    background: #1e8a08;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(38, 165, 10, 0.4);
}

._form .reg-btn:disabled {
    background: #9ca3af !important;
    cursor: not-allowed;
    transform: none;
}

/* =============================
   LOADER
   ============================= */
.loader {
    display: none;
    margin: 10px auto;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(0,0,0,0.1);
    border-top-color: #26a50a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes loader-spin { 100% { transform: rotate(360deg); } }
.loading .loader { display: block; }
.loading .reg-btn { opacity: 0.5; pointer-events: none; }

/* =============================
   RESPONSIVE
   ============================= */
@media (max-width: 480px) {
    ._form input {
        height: 44px;
        font-size: 14px;
    }
    ._form .reg-btn {
        padding: 12px 20px;
        font-size: 16px;
        height: 48px;
    }
}
