﻿/* ==========================================================================
   Shared Form Styles - ABTYP Forms
   Include this ONE file in ~/Views/Shared/_Layout.cshtml (in the <head>,
   after bootstrap.css) OR add it to your bundle config. Do NOT repeat these
   <style> blocks inside individual .cshtml views anymore.

   Example (_Layout.cshtml):
     <link rel="stylesheet" href="~/Content/shared-form-styles.css" />
   ========================================================================== */

/* ---- Generic input / number field resets ---- */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

input[type=radio][disabled] {
    opacity: 1;
    cursor: not-allowed;
}

.textArea-h {
    width: 300px;
    height: 150px;
    resize: both;
    overflow: auto;
}

.no-change {
    pointer-events: none;
    background-color: #fff;
    color: #000;
}

.hidden {
    display: none;
}

/* ==========================================================================
   Form watermark background logo
   Usage: add class "form-watermark" to the <form> (or wrapping div).
   Optionally override the logo per-page with an inline CSS var:
     style="--watermark-logo:url('/v2/img/other-logo.png')"
   ========================================================================== */
.form-watermark {
    position: relative;
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
}

    .form-watermark::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 350px;
        height: 350px;
        background: var(--watermark-logo, url('/v2/img/logo.png')) center center no-repeat;
        background-size: contain;
        opacity: 0.07;
        z-index: 0;
    }

    .form-watermark > * {
        position: relative;
        z-index: 1;
    }

/* ==========================================================================
   Design tokens â€” ABTYP form system
   Change a value here and it ripples through every form using this file.
   ========================================================================== */
:root {
    --clr-primary: #B71C1C;
    --clr-primary-dark: #7f1414;
    --clr-primary-soft: #fbeaea;
    --clr-accent-blue: #0D47A1;
    --clr-bg: #F6F3F1;
    --clr-card: #FFFFFF;
    --clr-border: #E9E1DD;
    --clr-text: #262220;
    --clr-muted: #736c67;
    --radius-lg: 16px;
    --radius-md: 10px;
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.form-page-bg {
    background: var(--clr-bg);
    font-family: var(--font-body);
    color: var(--clr-text);
    padding-top: 28px;
    padding-bottom: 40px;
}

/* ==========================================================================
   Card shell â€” replaces the old plain white card with a subtle top accent
   bar in the brand red, softer shadow, and consistent internal spacing.
   ========================================================================== */
.form-shell {
    background: var(--clr-card);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 45px rgba(38, 34, 32, 0.08), 0 2px 8px rgba(38, 34, 32, 0.04);
    padding: 32px 28px 28px;
    position: relative;
}

.form-shell-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: linear-gradient(90deg, var(--clr-primary-dark), var(--clr-primary) 55%, var(--clr-accent-blue));
}

@media (max-width: 576px) {
    .form-shell {
        padding: 26px 16px 20px;
    }
}

/* ---- Header ---- */
.form-header {
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--clr-border);
}

.form-header-logo {
    max-width: 76px;
}

.form-heading-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 22px;
    margin: 0;
    letter-spacing: 0.01em;
}

.form-heading-subtitle {
    font-family: var(--font-body);
    font-weight: 600;
    margin-top: 6px;
    color: var(--clr-accent-blue);
}

.form-heading-divider {
    border-top: 2px solid var(--clr-primary);
    width: 42px;
    margin: 10px auto;
    opacity: 0.7;
}

.form-heading-date {
    color: var(--clr-muted) !important;
    font-weight: 600;
    letter-spacing: 0.02em;
}

@media (max-width: 576px) {
    .form-heading-title {
        font-size: 17px;
    }

    .form-heading-subtitle {
        font-size: 14px;
    }
}

/* ==========================================================================
   Numbered step sections â€” the form genuinely is a sequence (applicant
   details â†’ location â†’ sanyojak details â†’ submit), so numbering here
   encodes a real order, not decoration.
   ========================================================================== */
.form-step-section {
    padding: 18px 0 6px;
    border-bottom: 1px dashed var(--clr-border);
    margin-bottom: 4px;
}

.form-step-section-final {
    border-bottom: none;
}

.form-step-eyebrow {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--clr-primary);
    background: var(--clr-primary-soft);
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 6px;
}

.form-step-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 17px;
    color: var(--clr-text);
    margin: 0 0 14px;
}

/* ---- Inputs & labels ---- */
.form-step-section label {
    font-size: 13px;
    font-weight: 600;
    color: var(--clr-text);
    margin-bottom: 6px;
}

.form-step-section .form-control {
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    padding: 9px 12px;
    font-size: 14px;
    color: var(--clr-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

    .form-step-section .form-control:focus {
        border-color: var(--clr-primary);
        box-shadow: 0 0 0 3px var(--clr-primary-soft);
        outline: none;
    }

.form-step-section .group {
    margin-bottom: 18px;
}

/* ---- Buttons ---- */
.form-shell .btn-danger {
    background: var(--clr-primary);
    border-color: var(--clr-primary);
    border-radius: var(--radius-md);
    font-weight: 600;
    letter-spacing: 0.01em;
}

    .form-shell .btn-danger:hover:not(:disabled) {
        background: var(--clr-primary-dark);
        border-color: var(--clr-primary-dark);
    }

.form-shell .btnSubmit {
    padding: 10px 42px;
    font-size: 15px;
    border-radius: 999px;
}

/* ==========================================================================
   Dynamic repeatable field group (e.g. "Add Sanyojak", up to a fixed max)
   Reuse this pattern + these classes for any other "add another entry"
   flow instead of rewriting it per form.
   ========================================================================== */
.sanyojak-row {
    padding-top: 8px;
    padding-bottom: 4px;
    border-bottom: 1px dashed #eee;
    margin-bottom: 8px;
}

.sanyojak-add-btn,
.sanyojak-remove-btn {
    border-radius: 999px;
    font-weight: 600;
    white-space: nowrap;
}

.sanyojak-limit-text {
    color: #6c757d;
    font-size: 12px;
    font-style: italic;
}

/* ==========================================================================
   OTP Verification Flow â€” shared across every form that has mobile/email OTP
   (registration, EGM, Seva forms, etc). Written once here; every view just
   reuses these class names, so no view needs its own <style> block anymore.
   ========================================================================== */
.otp-flow-card {
    border: 1px solid #f3c7c7;
    border-radius: 12px;
    background: #fff7f7;
    padding: 16px;
    box-shadow: 0 10px 24px rgba(183, 28, 28, 0.08);
}

.otp-step-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    color: #b71c1c;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.otp-helper-text {
    display: block;
    margin-top: 8px;
    color: #6c757d;
    font-size: 13px;
    line-height: 1.5;
}

.otp-status-text {
    display: block;
    min-height: 20px;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
}

.otp-resend-row {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.otp-resend-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: #b71c1c;
    font-size: 13px;
    font-weight: 700;
    text-decoration: underline;
    box-shadow: none !important;
}

    .otp-resend-link[disabled] {
        color: #9e9e9e;
        text-decoration: none;
        cursor: not-allowed;
    }

.otp-meta-text {
    color: #6c757d;
    font-size: 12px;
    line-height: 1.4;
}

.otp-section-hidden {
    display: none;
}

@media (max-width: 767.98px) {
    .otp-flow-card {
        padding: 14px;
    }

    .otp-resend-row {
        flex-direction: column;
        align-items: flex-start;
    }

    #ContactNoSendotpbutton,
    .VerifyOtp {
        width: 100%;
    }
}
