/* Zetpy Mobile Login Styles - Modern UI */

:root {
    --zml-primary: #007aff;
    /* Apple blue / Modern vivid blue */
    --zml-primary-hover: #0062cc;
    --zml-bg: #f5f7fa;
    --zml-card-bg: #ffffff;
    --zml-text: #1d1d1f;
    --zml-text-secondary: #86868b;
    --zml-border: #d2d2d7;
    --zml-input-bg: #ffffff;
    --zml-radius: 12px;
    --zml-radius-sm: 8px;
    --zml-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --zml-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

.zetpy-ml-page-wrapper {
    min-height: 80vh;
    padding: 60px 20px;
    background-color: var(--zml-bg);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    font-family: var(--zml-font-family);
}

.zetpy-ml-container {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}

.zetpy-ml-form-wrapper {
    background: var(--zml-card-bg);
    border: none;
    border-radius: var(--zml-radius);
    padding: 48px 40px;
    box-shadow: var(--zml-shadow);
}

.zetpy-ml-title {
    margin: 0 0 16px 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--zml-text);
    text-align: center;
    letter-spacing: -0.01em;
}

.zetpy-ml-description {
    margin: 0 0 32px 0;
    font-size: 15px;
    color: var(--zml-text-secondary);
    text-align: center;
    line-height: 1.5;
}

.zetpy-ml-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Messages */
.zetpy-ml-messages {
    margin-bottom: 24px;
    padding: 16px;
    border-radius: var(--zml-radius-sm);
    display: none;
    font-size: 14px;
    line-height: 1.4;
}

.zetpy-ml-messages.success {
    background-color: #e8f5e9;
    color: #1b5e20;
    display: block;
}

.zetpy-ml-messages.error {
    background-color: #ffebee;
    color: #c62828;
    display: block;
}

/* Steps */
.zetpy-ml-step {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.zetpy-ml-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Layout */
.zetpy-ml-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.zetpy-ml-field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.zetpy-ml-field-group label {
    font-weight: 600;
    color: var(--zml-text);
    font-size: 14px;
    margin-left: 2px;
}

/* Inputs - High Specificity */
.zetpy-ml-form-wrapper input.zetpy-ml-input,
.zetpy-ml-form-wrapper select.zetpy-ml-select,
.zetpy-ml-form-wrapper select.zetpy-ml-country-code-select {
    padding: 0 16px !important;
    height: 52px !important;
    min-height: 52px !important;
    line-height: normal !important;
    border: 1px solid var(--zml-border) !important;
    border-radius: var(--zml-radius-sm) !important;
    font-size: 16px !important;
    color: var(--zml-text) !important;
    background-color: var(--zml-input-bg) !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

.zetpy-ml-form-wrapper input.zetpy-ml-input:focus,
.zetpy-ml-form-wrapper select.zetpy-ml-select:focus,
.zetpy-ml-form-wrapper select.zetpy-ml-country-code-select:focus {
    outline: none !important;
    border-color: var(--zml-primary) !important;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.15) !important;
    background-color: #fff !important;
}

/* Specific fix for Country Code Select breadth/appearance */
.zetpy-ml-form-wrapper select.zetpy-ml-country-code-select {
    width: 80px !important;
    min-width: 80px !important;
    padding-right: 20px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23666' d='M5 6L0 0h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 10px 6px !important;
}

.zetpy-ml-mobile-input-wrapper {
    display: flex;
    align-items: stretch;
    gap: 12px;
}

.zetpy-ml-mobile-input {
    flex: 1;
}

/* OTP Input */
.zetpy-ml-input-otp {
    text-align: center;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 0.5em;
    padding-left: 0.5em;
    /* Compensate for letter-spacing to center visually */
    font-feature-settings: "tnum";
}

.zetpy-ml-help-text {
    margin: 8px 0 0 0;
    font-size: 13px;
    color: var(--zml-text-secondary);
    text-align: center;
}

.zetpy-ml-captcha-group {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
    margin-top: 10px !important;
    margin-bottom: 20px !important;
}

.zetpy-ml-captcha-group label {
    margin-bottom: 0 !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    flex: none !important;
}

.zetpy-ml-form-wrapper input.zetpy-ml-captcha-input {
    padding: 0 !important;
    margin: 0 !important;
    width: 35px !important;
    min-width: 35px !important;
    height: 30px !important;
    min-height: 30px !important;
    border-radius: 0 !important;
    border: 1px solid #000000 !important;
    text-align: center !important;
}

.zetpy-ml-form-wrapper input.zetpy-ml-captcha-input:focus {
    outline: none !important;
    border: 1px solid #000000 !important;
    box-shadow: none !important;
}

/* Buttons */
.zetpy-ml-button {
    height: 52px;
    padding: 0 32px;
    border: none;
    border-radius: var(--zml-radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    width: 100%;
}

/* Button - High Specificity */
.zetpy-ml-form-wrapper button.zetpy-ml-button-primary {
    background-color: var(--zml-primary) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: var(--zml-radius-sm) !important;
    height: 52px !important;
    line-height: 1 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    /* Prevent Flatsome uppercase */
    letter-spacing: normal !important;
    padding: 0 32px !important;
    margin-top: 8px !important;
    width: 100% !important;
    box-shadow: none !important;
    /* Explicitly remove shadow */
    cursor: pointer !important;
    text-shadow: none !important;
}

.zetpy-ml-form-wrapper button.zetpy-ml-button-primary:hover {
    background-color: var(--zml-primary-hover) !important;
    transform: translateY(-1px);
    color: #ffffff !important;
}

.zetpy-ml-form-wrapper button.zetpy-ml-button-primary:active {
    transform: translateY(1px);
}

.zetpy-ml-button-primary:disabled {
    background-color: var(--zml-border);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Link Buttons */
.zetpy-ml-button-link {
    background: none;
    color: var(--zml-text-secondary);
    padding: 8px;
    font-size: 14px;
    font-weight: 500;
    height: auto;
    width: auto;
    display: inline-block;
    transition: color 0.2s;
    margin-top: 12px;
    width: 100%;
}

.zetpy-ml-button-link:hover {
    color: var(--zml-primary);
    background: none;
}

/* Loading Spinner */
.zetpy-ml-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: zetpy-ml-spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    margin-right: 10px;
}

@keyframes zetpy-ml-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Channel Toggle & Divider */
.zetpy-ml-channel-toggle {
    margin-top: 32px;
    text-align: center;
}

.zetpy-ml-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    gap: 16px;
}

.zetpy-ml-divider-line {
    flex: 1;
    height: 1px;
    background-color: #e5e5e5;
}

.zetpy-ml-divider-text {
    font-size: 13px;
    color: #999;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.05em;
}

/* Responsive */
@media (max-width: 600px) {
    .zetpy-ml-page-wrapper {
        padding: 0;
        background-color: var(--zml-card-bg);
        /* Full white on mobile */
    }

    .zetpy-ml-form-wrapper {
        box-shadow: none;
        padding: 40px 24px;
        border-radius: 0;
    }

    .zetpy-ml-container {
        max-width: 100%;
        margin: 0;
    }

    .zetpy-ml-title {
        font-size: 24px;
    }
}