/**
 * SriMart OTP Authentication - v2.0.3
 * FIXED: Clean gray SVG icons, proper input text alignment, no emoji styling issues
 */

:root {
    --srimart-primary: #fcb800;
    --srimart-primary-hover: #e5a700;
    --srimart-primary-light: #fff8e1;
    --srimart-primary-glow: rgba(252, 184, 0, 0.35);
    --srimart-text: #333333;
    --srimart-text-light: #666666;
    --srimart-text-muted: #999999;
    --srimart-icon-color: #888888;
    --srimart-border: #e0e0e0;
    --srimart-white: #ffffff;
    --srimart-success: #28a745;
    --srimart-error: #dc3545;
    --srimart-info: #17a2b8;
    --srimart-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    --srimart-shadow-glow: 0 0 0 4px var(--srimart-primary-glow), 0 8px 32px rgba(0, 0, 0, 0.15);
    --srimart-radius: 16px;
    --srimart-radius-sm: 8px;
}

/* Reset */
.srimart-auth-wrapper *,
.srimart-auth-wrapper *::before,
.srimart-auth-wrapper *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Wrapper - NO GREY BACKGROUND */
.srimart-auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    min-height: 100px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    font-size: 16px;
}

/* Card - WIDER for 60+ audience */
.srimart-auth-card {
    width: 100%;
    max-width: 620px; /* INCREASED from 560px */
    background: var(--srimart-white);
    border-radius: var(--srimart-radius);
    border: 2px solid var(--srimart-primary);
    box-shadow: var(--srimart-shadow-glow);
    padding: 40px 48px; /* More padding */
    animation: srimart-fadeIn 0.3s ease;
}

.srimart-customer-card {
    max-width: 620px; /* INCREASED for 60+ audience */
}

.srimart-vendor-card {
    max-width: 780px; /* INCREASED for vendors */
}

@keyframes srimart-fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header */
.srimart-auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.srimart-auth-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--srimart-text);
    margin: 0 0 8px 0;
}

.srimart-auth-subtitle {
    font-size: 16px;
    color: var(--srimart-text-light);
    margin: 0;
}

/* Tabs */
.srimart-auth-tabs {
    display: flex;
    border-bottom: 2px solid var(--srimart-border);
    margin-bottom: 28px;
    gap: 8px;
}

.srimart-tab {
    flex: 1;
    padding: 14px 20px;
    font-size: 17px;
    font-weight: 600;
    color: var(--srimart-text-light);
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: -2px;
}

.srimart-tab:hover {
    color: var(--srimart-text);
}

.srimart-tab.active {
    color: var(--srimart-text);
    border-bottom-color: var(--srimart-primary);
}

/* Tab Content */
.srimart-tab-content {
    display: none;
}

.srimart-tab-content.active {
    display: block;
}

/* Form Sections */
.srimart-form-section {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--srimart-border);
}

.srimart-form-section:last-of-type {
    border-bottom: none;
}

.srimart-section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--srimart-text);
    margin: 0 0 8px 0;
}

/* Privacy Notes */
.srimart-privacy-note {
    font-size: 14px;
    color: var(--srimart-info);
    margin: 0 0 16px 0;
    padding: 10px 14px;
    background: #e8f4f8;
    border-radius: var(--srimart-radius-sm);
    border-left: 3px solid var(--srimart-info);
}

.srimart-privacy-hint {
    color: var(--srimart-info) !important;
}

/* Form Groups */
.srimart-form-group {
    margin-bottom: 20px;
}

.srimart-form-group label {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: var(--srimart-text);
    margin-bottom: 8px;
}

.srimart-form-group label .required {
    color: var(--srimart-error);
}

.srimart-form-group label .optional {
    color: var(--srimart-text-muted);
    font-weight: 400;
    font-size: 13px;
}

/* Input Wrapper - FIXED positioning */
.srimart-input-wrapper {
    position: relative;
    display: block;
}

/* Input Icon - FIXED: Clean gray, no background, proper alignment */
.srimart-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
    color: var(--srimart-icon-color);
    font-style: normal;
    font-size: 16px;
    line-height: 1;
    /* Ensure no emoji styling */
    -webkit-text-stroke: 0;
    text-shadow: none;
    background: none !important;
    border: none !important;
    filter: grayscale(100%);
    opacity: 0.6;
}

/* SVG icon styling */
.srimart-input-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--srimart-icon-color);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Inputs - FIXED alignment */
.srimart-form-group input[type="text"],
.srimart-form-group input[type="email"],
.srimart-form-group input[type="tel"],
.srimart-form-group input[type="password"],
.srimart-form-group input[type="number"],
.srimart-form-group select,
.srimart-form-group textarea {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    font-size: 16px;
    line-height: 50px;
    color: var(--srimart-text);
    background: var(--srimart-white);
    border: 2px solid var(--srimart-border);
    border-radius: var(--srimart-radius-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    vertical-align: middle;
}

/* Input with icon - FIXED padding to prevent text overlap */
.srimart-input-wrapper input {
    padding-left: 46px !important;
    padding-right: 16px;
}

/* Input with password toggle */
.srimart-input-wrapper input[type="password"],
.srimart-input-wrapper input.has-toggle {
    padding-right: 46px !important;
}

.srimart-form-group input:focus,
.srimart-form-group select:focus,
.srimart-form-group textarea:focus {
    border-color: var(--srimart-primary);
    box-shadow: 0 0 0 3px var(--srimart-primary-glow);
}

.srimart-form-group input::placeholder {
    color: var(--srimart-text-muted);
    opacity: 1;
}

.srimart-form-group textarea {
    height: auto;
    line-height: 1.5;
    padding: 14px 16px;
    min-height: 100px;
    resize: vertical;
}

.srimart-form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* Input Hints */
.srimart-input-hint {
    display: block;
    font-size: 13px;
    color: var(--srimart-text-muted);
    margin-top: 6px;
}

/* Shop URL Status */
.srimart-shop-url-status {
    font-weight: 500;
}

.srimart-shop-url-status.available {
    color: var(--srimart-success) !important;
}

.srimart-shop-url-status.unavailable {
    color: var(--srimart-error) !important;
}

/* Input Group (prefix) */
.srimart-input-group {
    display: flex;
    align-items: stretch;
}

.srimart-input-prefix {
    display: flex;
    align-items: center;
    padding: 0 14px;
    font-size: 14px;
    color: var(--srimart-text-muted);
    background: #f5f5f5;
    border: 2px solid var(--srimart-border);
    border-right: none;
    border-radius: var(--srimart-radius-sm) 0 0 var(--srimart-radius-sm);
    white-space: nowrap;
}

.srimart-input-group input {
    border-radius: 0 var(--srimart-radius-sm) var(--srimart-radius-sm) 0;
    flex: 1;
}

/* Password Toggle - FIXED: Clean gray icon */
.srimart-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--srimart-icon-color);
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    z-index: 2;
    filter: grayscale(100%);
    opacity: 0.6;
}

.srimart-password-toggle:hover {
    color: var(--srimart-text);
    opacity: 1;
}

.srimart-password-toggle svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* Password Strength */
.srimart-password-strength {
    height: 4px;
    margin-top: 8px;
    border-radius: 2px;
    background: var(--srimart-border);
    overflow: hidden;
}

.srimart-password-strength::after {
    content: '';
    display: block;
    height: 100%;
    width: 0;
    transition: all 0.3s ease;
}

.srimart-password-strength.weak::after {
    width: 33%;
    background: var(--srimart-error);
}

.srimart-password-strength.medium::after {
    width: 66%;
    background: var(--srimart-primary);
}

.srimart-password-strength.strong::after {
    width: 100%;
    background: var(--srimart-success);
}

/* Form Row */
.srimart-form-row {
    display: flex;
    gap: 16px;
}

.srimart-form-row .srimart-half {
    flex: 1;
}

.srimart-form-options {
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Checkbox */
.srimart-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 15px;
    color: var(--srimart-text);
    cursor: pointer;
}

.srimart-checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--srimart-primary);
}

.srimart-terms-checkbox {
    margin-bottom: 20px;
}

/* Buttons */
.srimart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 28px;
    height: 52px;
    font-size: 17px;
    font-weight: 600;
    border-radius: var(--srimart-radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.srimart-btn-block {
    width: 100%;
}

.srimart-btn-primary {
    background: var(--srimart-primary);
    color: #000;
}

.srimart-btn-primary:hover {
    background: var(--srimart-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(252, 184, 0, 0.4);
}

.srimart-btn-primary:active {
    transform: translateY(0);
}

.srimart-btn-outline {
    background: transparent;
    color: var(--srimart-text);
    border: 2px solid var(--srimart-border);
}

.srimart-btn-outline:hover {
    border-color: var(--srimart-primary);
    background: var(--srimart-primary-light);
}

.srimart-btn:disabled,
.srimart-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.srimart-btn .btn-loader {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.srimart-btn.loading .btn-text {
    display: none;
}

.srimart-btn.loading .btn-loader {
    display: block;
}

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

/* Links */
.srimart-link {
    color: var(--srimart-primary-hover);
    text-decoration: none;
    font-weight: 500;
}

.srimart-link:hover {
    text-decoration: underline;
}

.srimart-link-btn {
    background: none;
    border: none;
    color: var(--srimart-primary-hover);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
}

.srimart-link-btn:hover {
    text-decoration: underline;
}

.srimart-link-btn:disabled {
    color: var(--srimart-text-muted);
    cursor: not-allowed;
}

/* OTP Toggle */
.srimart-otp-toggle {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--srimart-border);
}

/* OTP Inputs */
.srimart-otp-inputs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 16px 0;
}

.srimart-otp-inputs input {
    width: 56px;
    height: 64px;
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    border: 2px solid var(--srimart-border);
    border-radius: var(--srimart-radius-sm);
    outline: none;
    transition: all 0.2s ease;
    padding: 0 !important;
    line-height: 60px !important;
}

.srimart-otp-inputs input:focus {
    border-color: var(--srimart-primary);
    box-shadow: 0 0 0 3px var(--srimart-primary-glow);
}

.srimart-otp-inputs input.filled {
    border-color: var(--srimart-primary);
    background: var(--srimart-primary-light);
}

.srimart-otp-inputs input.error {
    border-color: var(--srimart-error);
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* OTP Verify Section */
.srimart-otp-verify-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--srimart-border);
}

.srimart-otp-sent-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    background: #e8f5e9;
    border-radius: var(--srimart-radius-sm);
    color: var(--srimart-success);
    font-size: 15px;
    margin-bottom: 20px;
}

/* Resend */
.srimart-resend-wrapper {
    text-align: center;
    margin-top: 16px;
}

.srimart-resend-timer {
    font-size: 14px;
    color: var(--srimart-text-muted);
    margin-left: 8px;
}

/* Email Fallback - Clean professional style */
.srimart-email-fallback,
.srimart-email-fallback-section {
    text-align: center;
    margin-top: 16px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: var(--srimart-radius-sm);
    border: none;
}

.srimart-fallback-text {
    font-size: 14px;
    color: var(--srimart-text-muted);
    margin: 0 0 8px 0;
}

.srimart-email-fallback-section .srimart-link-btn {
    color: var(--srimart-primary-hover);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font-size: 14px;
}

.srimart-email-fallback-section .srimart-link-btn:hover {
    text-decoration: underline;
}

.srimart-email-fallback-section .srimart-link-btn:disabled {
    color: var(--srimart-text-muted);
    cursor: not-allowed;
}

/* Email Sent Status */
.srimart-email-sent-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: #e8f5e9;
    border-radius: var(--srimart-radius-sm);
    margin-top: 8px;
    font-size: 14px;
    color: var(--srimart-success);
}

.srimart-email-sent-status .srimart-success-icon {
    font-size: 16px;
    font-weight: bold;
}

.srimart-email-sent-status strong {
    color: var(--srimart-text);
}

/* Messages */
.srimart-form-messages {
    margin: 16px 0;
}

.srimart-message {
    padding: 14px 16px;
    border-radius: var(--srimart-radius-sm);
    font-size: 15px;
}

.srimart-message-success {
    background: #e8f5e9;
    color: var(--srimart-success);
    border: 1px solid #c8e6c9;
}

.srimart-message-error {
    background: #ffebee;
    color: var(--srimart-error);
    border: 1px solid #ffcdd2;
}

.srimart-message-info {
    background: #e3f2fd;
    color: var(--srimart-info);
    border: 1px solid #bbdefb;
}

/* reCAPTCHA error */
.srimart-recaptcha-error {
    margin: 16px 0;
}

/* Terms Notice */
.srimart-terms-notice {
    text-align: center;
    font-size: 13px;
    color: var(--srimart-text-muted);
    margin-top: 16px;
}

.srimart-terms-notice a {
    color: var(--srimart-primary-hover);
}

/* Social Login */
.srimart-social-login {
    margin-top: 24px;
}

.srimart-social-divider {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.srimart-social-divider::before,
.srimart-social-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--srimart-border);
}

.srimart-social-divider span {
    padding: 0 16px;
    font-size: 14px;
    color: var(--srimart-text-muted);
}

.srimart-social-buttons {
    display: flex;
    gap: 12px;
}

.srimart-social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 48px;
    font-size: 15px;
    font-weight: 500;
    border: 2px solid var(--srimart-border);
    border-radius: var(--srimart-radius-sm);
    background: var(--srimart-white);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--srimart-text);
}

.srimart-social-btn:hover {
    border-color: var(--srimart-text-muted);
    background: #f9f9f9;
}

.srimart-google-btn:hover {
    border-color: #4285F4;
}

.srimart-facebook-btn:hover {
    border-color: #1877F2;
}

/* reCAPTCHA */
.srimart-recaptcha-wrapper {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    min-height: 78px;
}

/* Logged In State */
.srimart-logged-in {
    text-align: center;
    padding: 40px;
}

.srimart-logged-in h3 {
    font-size: 24px;
    margin-bottom: 12px;
}

.srimart-logged-in p {
    color: var(--srimart-text-light);
    margin-bottom: 24px;
}

.srimart-logged-in .srimart-btn {
    margin: 0 8px;
}

/* Notice */
.srimart-notice {
    padding: 20px;
    background: var(--srimart-primary-light);
    border: 1px solid var(--srimart-primary);
    border-radius: var(--srimart-radius-sm);
    text-align: center;
    color: var(--srimart-text);
}

/* Responsive */
@media (max-width: 640px) {
    .srimart-auth-wrapper {
        padding: 20px 16px;
    }
    
    .srimart-auth-card {
        padding: 24px 20px;
    }
    
    .srimart-auth-title {
        font-size: 24px;
    }
    
    .srimart-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .srimart-otp-inputs {
        gap: 8px;
    }
    
    .srimart-otp-inputs input {
        width: 48px;
        height: 56px;
        font-size: 24px;
    }
    
    .srimart-social-buttons {
        flex-direction: column;
    }
    
    .srimart-input-prefix {
        font-size: 12px;
        padding: 0 10px;
    }
}
