/* ==========================================================
   Granth Bulk SMS — OTP Login Form Styles
   ========================================================== */

.granth-otp-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 44px 16px;
    font-family: "Aptos", "Segoe UI", Tahoma, sans-serif;
    color: #171717;
}

.granth-otp-card {
    background: linear-gradient(180deg, #fffdf8 0%, #ffffff 42%);
    border: 1px solid #ded6c8;
    border-radius: 12px;
    padding: 38px 34px 34px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 22px 60px rgba(36, 30, 18, 0.12);
}

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

.granth-otp-brand {
    margin-bottom: 12px;
}

.granth-otp-brand svg {
    border-radius: 10px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18);
}

.granth-otp-title {
    font-size: 1.625rem;
    font-weight: 750;
    color: #171717;
    margin: 0 0 6px;
    line-height: 1.3;
}

.granth-otp-subtitle {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* Notice */
.granth-otp-notice {
    border-radius: 8px;
    padding: 11px 14px;
    font-size: 0.875rem;
    margin-bottom: 16px;
    line-height: 1.5;
}

.granth-otp-notice.is-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #dc2626;
}

.granth-otp-notice.is-success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #16a34a;
}

/* Fields */
.granth-otp-field {
    margin-bottom: 20px;
}

.granth-otp-field label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #2f2b25;
    margin-bottom: 8px;
}

.granth-otp-field input[type="text"],
.granth-otp-field input[type="tel"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cfc6b8;
    border-radius: 8px;
    font-size: 0.9375rem;
    color: #171717;
    background: #fffaf0;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
    outline: none;
}

.granth-otp-field input:focus {
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
    background: #ffffff;
}

/* Phone prefix row */
.granth-phone-row {
    display: flex;
    align-items: center;
    border: 1px solid #cfc6b8;
    border-radius: 8px;
    overflow: hidden;
    background: #fffaf0;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.granth-phone-row:focus-within {
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
    background: #ffffff;
}

.granth-prefix {
    padding: 10px 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #2f2b25;
    background: #f4ead9;
    border-right: 1px solid #cfc6b8;
    user-select: none;
    white-space: nowrap;
}

.granth-phone-row input {
    flex: 1;
    padding: 10px 14px;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    font-size: 0.9375rem;
    color: #171717;
    width: 100%;
}

/* Submit Button */
.granth-otp-btn {
    width: 100%;
    padding: 12px 20px;
    background: #0f766e;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s, transform 0.1s;
    position: relative;
    margin-top: 4px;
}

.granth-otp-btn:hover {
    background: #115e59;
}

.granth-otp-btn:active {
    transform: scale(0.98);
}

.granth-otp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Spinner */
.granth-btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: granthSpin 0.7s linear infinite;
    flex-shrink: 0;
}

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

/* OTP Digit Boxes */
.granth-otp-boxes {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 6px 0;
}

.granth-otp-digit {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 1.375rem;
    font-weight: 700;
    color: #0f172a;
    border: 2px solid #cfc6b8;
    border-radius: 10px;
    background: #fffaf0;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
    -moz-appearance: textfield;
}

.granth-otp-digit::-webkit-outer-spin-button,
.granth-otp-digit::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.granth-otp-digit:focus {
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
    background: #ffffff;
}

.granth-otp-digit.is-filled {
    border-color: #0f766e;
    background: #ecfdf5;
}

/* Sent info row */
.granth-otp-sent-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: #475569;
    margin-bottom: 18px;
    padding: 8px 12px;
    background: #fffaf0;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.granth-otp-sent-info span {
    flex: 1;
}

/* Resend row */
.granth-resend-row {
    text-align: center;
    margin-top: 14px;
    font-size: 0.8125rem;
    color: #64748b;
}

/* Link button */
.granth-link-btn {
    background: none;
    border: none;
    padding: 0;
    color: #0f766e;
    font-size: inherit;
    cursor: pointer;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.15s;
}

.granth-link-btn:hover {
    text-decoration-color: #0f766e;
}

@media (max-width: 480px) {
    .granth-otp-card {
        padding: 28px 20px;
    }
    .granth-otp-digit {
        width: 40px;
        height: 48px;
        font-size: 1.25rem;
    }
}
