/* =========================================================
 * VISMART SERVICE REQUEST FORM
 * Scoped / lightweight
 * ========================================================= */

.vismart-service-request-section {
    --vs-red: #c40000;
    --vs-red-dark: #a90000;
    --vs-navy: #172b4d;
    --vs-text: #172b4d;
    --vs-muted: #7b8794;
    --vs-border: #e1e7ee;
    --vs-bg: #f7f9fc;

    width: 100%;
    box-sizing: border-box;
}


.vismart-service-request-section *,
.vismart-service-request-section *::before,
.vismart-service-request-section *::after {
    box-sizing: border-box;
}


.vismart-service-request-card {
    position: relative;

    width: 100%;
    max-width: 980px;

    margin: 0 auto;
    padding: 26px 28px;

    border: 1px solid rgba(23, 43, 77, .11);
    border-radius: 22px;

    background:
        radial-gradient(
            circle at top right,
            rgba(196, 0, 0, .045),
            transparent 30%
        ),
        #fff;

    box-shadow:
        0 12px 35px rgba(23, 43, 77, .08);

    overflow: hidden;
}


.vismart-service-request-card::before {
    content: "";

    position: absolute;

    top: 0;
    right: 0;
    left: 0;

    height: 4px;

    background:
        linear-gradient(
            90deg,
            var(--vs-navy),
            var(--vs-red)
        );
}


/* =========================================================
 * Header
 * ========================================================= */

.vismart-service-request-header {
    display: flex;
    align-items: center;
    gap: 16px;

    margin-bottom: 22px;
}


.vismart-service-request-icon {
    position: relative;

    width: 54px;
    height: 54px;

    flex: 0 0 54px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 15px;

    background:
        linear-gradient(
            145deg,
            var(--vs-red),
            var(--vs-red-dark)
        );

    box-shadow:
        0 8px 18px rgba(196, 0, 0, .18);

    transform: rotate(-3deg);

    transition:
        transform .25s ease,
        box-shadow .25s ease;
}


.vismart-service-request-icon:hover {
    transform: rotate(0deg) translateY(-2px);

    box-shadow:
        0 11px 22px rgba(196, 0, 0, .22);
}


.vismart-service-request-icon span,
.vismart-service-request-icon span::before,
.vismart-service-request-icon span::after {
    position: absolute;
    display: block;
    content: "";
}


.vismart-service-request-icon span {
    width: 22px;
    height: 16px;

    border: 2px solid #fff;
    border-radius: 4px;
}


.vismart-service-request-icon span::before {
    right: -5px;
    bottom: -6px;

    width: 9px;
    height: 9px;

    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;

    transform: skewX(-28deg);
}


.vismart-service-request-heading {
    min-width: 0;
}


.vismart-service-request-eyebrow {
    display: block;

    margin-bottom: 2px;

    color: var(--vs-red);

    font-size: 11px;
    font-weight: 800;
}


.vismart-service-request-heading h2 {
    margin: 0;

    color: var(--vs-text);

    font-size: 23px;
    font-weight: 900;
    line-height: 1.55;
}


.vismart-service-request-heading p {
    margin: 3px 0 0;

    color: var(--vs-muted);

    font-size: 12px;
    font-weight: 500;
    line-height: 1.9;
}


/* =========================================================
 * Grid
 * ========================================================= */

.vs-service-grid {
    display: grid;

    width: 100%;

    gap: 12px;
}


.vs-service-grid-2 {
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
}


/* =========================================================
 * Fields
 * ========================================================= */

.vs-service-field {
    position: relative;

    min-width: 0;

    margin-bottom: 12px;
}


.vs-service-field label {
    display: block;

    margin: 0 0 6px;

    color: var(--vs-text);

    font-size: 12px;
    font-weight: 800;

    line-height: 1.6;

    text-align: right;
}


.vs-service-field label > span {
    color: var(--vs-red);
}


.vs-service-field input,
.vs-service-field select {
    width: 100%;
    height: 46px;

    padding: 10px 13px;

    border: 1px solid var(--vs-border);
    border-radius: 11px;

    outline: none;

    background: #fff;
    color: var(--vs-text);

    font-family: inherit;
    font-size: 13px;
    font-weight: 600;

    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        transform .18s ease,
        background-color .2s ease;
}


.vs-service-field input:hover,
.vs-service-field select:hover {
    border-color: #cad3de;
    background: #fcfdff;
}


.vs-service-field input:focus,
.vs-service-field select:focus {
    border-color: var(--vs-red);

    box-shadow:
        0 0 0 4px rgba(196, 0, 0, .065);

    background: #fff;

    transform: translateY(-1px);
}


.vs-service-field select {
    appearance: auto;

    cursor: pointer;

    text-align: right;
}


/* =========================================================
 * File
 * ========================================================= */

.vs-service-file-input {
    position: absolute !important;

    width: 1px !important;
    height: 1px !important;

    opacity: 0 !important;

    pointer-events: none !important;
}


.vs-service-file-box {
    width: 100%;

    min-height: 46px;

    display: flex !important;
    align-items: center;
    gap: 10px;

    margin: 0 !important;
    padding: 6px 8px;

    border: 1px solid var(--vs-border);
    border-radius: 11px;

    background: #fff;

    cursor: pointer;

    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        transform .18s ease,
        background-color .2s ease;
}


.vs-service-file-box:hover {
    border-color: #cad3de;
    background: #fcfdff;

    transform: translateY(-1px);
}


.vs-service-file-box:focus-within {
    border-color: var(--vs-red);

    box-shadow:
        0 0 0 4px rgba(196, 0, 0, .065);
}


.vs-service-file-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    min-height: 32px;

    padding: 6px 11px;

    border-radius: 8px;

    background:
        #f0f3f7;

    color: var(--vs-navy);

    font-size: 11px;
    font-weight: 800;

    transition:
        background .18s ease,
        color .18s ease;
}


.vs-service-file-box:hover .vs-service-file-button {
    background: var(--vs-navy);
    color: #fff;
}


.vs-service-file-name {
    min-width: 0;

    flex: 1;

    overflow: hidden;

    color: #8a96a4;

    font-size: 11px;
    font-weight: 600;

    line-height: 1.7;

    text-overflow: ellipsis;
    white-space: nowrap;

    text-align: right;
}


.vs-service-file-name.has-file {
    color: var(--vs-text);
}


.vs-service-file-help {
    display: block;

    margin-top: 5px;

    color: #98a2af;

    font-size: 10px;
    font-weight: 500;

    line-height: 1.7;

    text-align: right;
}


/* =========================================================
 * reCAPTCHA
 * ========================================================= */

.vs-service-recaptcha-wrap {
    position: relative;

    min-height: 78px;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;

    gap: 8px;

    margin-top: 2px;
    margin-bottom: 14px;
}


.vs-service-recaptcha-wrap .g-recaptcha {
    max-width: 100%;
}


.vs-service-recaptcha-loading-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 32px;

    padding: 6px 11px;

    border: 1px solid rgba(23, 43, 77, .12);
    border-radius: 9px;

    background: #fff;
    color: #7b8794;

    font-family: inherit;
    font-size: 10px;
    font-weight: 600;

    line-height: 1.7;

    box-shadow:
        0 3px 10px rgba(23, 43, 77, .045);

    transition:
        border-color .2s ease,
        color .2s ease,
        background-color .2s ease,
        transform .18s ease,
        box-shadow .2s ease;
}


.vs-service-recaptcha-loading-text:hover {
    border-color: rgba(196, 0, 0, .28);

    background: #fcfdff;

    color: var(--vs-red);

    transform: translateY(-1px);

    box-shadow:
        0 5px 13px rgba(23, 43, 77, .07);
}


.vs-service-recaptcha-loading-text.is-hidden {
    display: none;
}


/* =========================================================
 * Honeypot
 * ========================================================= */

.vs-service-hp {
    position: absolute !important;

    width: 1px !important;
    height: 1px !important;

    margin: -1px !important;
    padding: 0 !important;

    overflow: hidden !important;

    clip: rect(0 0 0 0) !important;

    white-space: nowrap !important;

    border: 0 !important;
}


/* =========================================================
 * Status
 * ========================================================= */

.vs-service-status {
    margin: 0 0 12px;

    padding: 10px 13px;

    border-radius: 10px;

    font-size: 12px;
    font-weight: 700;

    line-height: 1.8;

    text-align: right;
}


.vs-service-status.is-success {
    border: 1px solid rgba(22, 128, 60, .16);

    background: rgba(22, 128, 60, .065);

    color: #176b38;
}


.vs-service-status.is-error {
    border: 1px solid rgba(196, 0, 0, .16);

    background: rgba(196, 0, 0, .055);

    color: #a90000;
}


/* =========================================================
 * Submit
 * ========================================================= */

.vs-service-submit-row {
    display: flex;
    justify-content: flex-start;
}


.vs-service-submit {
    position: relative;

    min-width: 175px;
    min-height: 50px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    margin: 0;
    padding: 11px 18px;

    border: 0 !important;
    border-radius: 12px !important;

    background:
        linear-gradient(
            135deg,
            var(--vs-red),
            var(--vs-red-dark)
        ) !important;

    color: #fff !important;

    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 900 !important;

    cursor: pointer;

    box-shadow:
        0 8px 18px rgba(196, 0, 0, .20);

    overflow: hidden;

    transition:
        transform .18s ease,
        box-shadow .2s ease,
        filter .2s ease;
}


.vs-service-submit::before {
    content: "";

    position: absolute;

    top: 0;
    right: -70%;

    width: 60%;
    height: 100%;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255,255,255,.25),
            transparent
        );

    transform: skewX(-20deg);

    transition:
        right .55s ease;
}


.vs-service-submit:hover::before {
    right: 130%;
}


.vs-service-submit:hover {
    transform: translateY(-2px);

    box-shadow:
        0 12px 24px rgba(196, 0, 0, .28);

    filter: brightness(1.03);
}


.vs-service-submit:active {
    transform: translateY(2px) scale(.985);

    box-shadow:
        0 4px 9px rgba(196, 0, 0, .18);
}


.vs-service-submit:disabled {
    opacity: .82;

    cursor: wait;

    transform: none;

    box-shadow:
        0 6px 14px rgba(196, 0, 0, .13);
}


.vs-service-submit-icon {
    width: 18px;
    height: 18px;

    display: inline-flex;

    transition:
        transform .2s ease;
}


.vs-service-submit:hover .vs-service-submit-icon {
    transform: translateX(-3px);
}


.vs-service-submit-icon svg {
    width: 100%;
    height: 100%;

    fill: currentColor;
}


.vs-service-loader {
    display: none;

    width: 17px;
    height: 17px;

    border: 2px solid rgba(255,255,255,.38);
    border-top-color: #fff;

    border-radius: 50%;

    animation:
        vsServiceSpin .7s linear infinite;
}


.vs-service-submit.is-loading
.vs-service-submit-icon {
    display: none;
}


.vs-service-submit.is-loading
.vs-service-loader {
    display: inline-block;
}


.vs-service-submit.is-success {
    background:
        linear-gradient(
            135deg,
            #16803c,
            #126a30
        ) !important;

    box-shadow:
        0 8px 18px rgba(22, 128, 60, .20);
}


@keyframes vsServiceSpin {
    to {
        transform: rotate(360deg);
    }
}


/* =========================================================
 * Jalali date picker + Tehran network time
 * ========================================================= */

.vs-service-date-picker {
    position: relative;
}


.vs-service-date-display {
    position: relative;

    width: 100%;
    min-height: 46px;

    display: flex;
    align-items: center;
    justify-content: flex-start;

    padding: 10px 42px 10px 13px;

    border: 1px solid var(--vs-border);
    border-radius: 11px;

    outline: none;

    background: #fff;
    color: var(--vs-text);

    font-family: inherit;
    font-size: 13px;
    font-weight: 600;

    cursor: pointer;
    text-align: right;

    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        transform .18s ease,
        background-color .2s ease;
}


.vs-service-date-display::before {
    content: "";

    position: absolute;

    right: 14px;
    top: 50%;

    width: 15px;
    height: 15px;

    border: 1.8px solid currentColor;
    border-radius: 3px;

    transform: translateY(-50%);

    opacity: .82;
}


.vs-service-date-display::after {
    content: "";

    position: absolute;

    right: 17px;
    top: calc(50% - 3px);

    width: 9px;
    height: 1.8px;

    background: currentColor;

    box-shadow:
        0 -4px 0 -0.2px currentColor;

    transform: translateY(-50%);

    opacity: .82;
}


.vs-service-date-display:hover {
    border-color: #cad3de;
    background: #fcfdff;

    transform: translateY(-1px);
}


.vs-service-date-display:focus-visible,
.vs-service-date-display[aria-expanded="true"] {
    border-color: var(--vs-red);

    box-shadow:
        0 0 0 4px rgba(196, 0, 0, .065);

    background: #fff;
}


.vs-service-date-display.is-selected {
    color: var(--vs-text);
}


.vs-service-date-display.is-empty {
    color: #8a96a4;
}


.vs-service-calendar {
    position: absolute;
    z-index: 10020;

    top: calc(100% + 8px);
    right: 0;

    width: min(340px, calc(100vw - 32px));

    padding: 14px;

    border: 1px solid rgba(23, 43, 77, .12);
    border-radius: 16px;

    background: #fff;

    box-shadow:
        0 18px 42px rgba(23, 43, 77, .16);

    direction: rtl;
}


.vs-service-calendar[hidden] {
    display: none;
}


.vs-service-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;

    margin-bottom: 10px;
}


.vs-service-calendar-title {
    flex: 1;
    min-width: 0;

    color: var(--vs-text);

    font-size: 13px;
    font-weight: 900;

    text-align: center;
}


.vs-service-calendar-nav {
    width: 34px;
    height: 34px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 34px;

    border: 1px solid #e2e7ed;
    border-radius: 9px;

    background: #fff;
    color: var(--vs-navy);

    font-family: inherit;
    font-size: 18px;
    font-weight: 800;
    line-height: 1;

    cursor: pointer;

    transition:
        background .18s ease,
        color .18s ease,
        border-color .18s ease,
        transform .18s ease;
}


.vs-service-calendar-nav:hover {
    border-color: var(--vs-navy);
    background: var(--vs-navy);
    color: #fff;

    transform: translateY(-1px);
}


.vs-service-calendar-weekdays,
.vs-service-calendar-grid {
    display: grid;

    grid-template-columns:
        repeat(7, minmax(0, 1fr));

    gap: 4px;
}


.vs-service-calendar-weekdays {
    margin-bottom: 5px;
}


.vs-service-calendar-weekday {
    padding: 4px 0;

    color: #8a96a4;

    font-size: 10px;
    font-weight: 800;

    text-align: center;
}


.vs-service-calendar-day {
    min-width: 0;

    aspect-ratio: 1 / 1;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid transparent;
    border-radius: 9px;

    background: #fff;
    color: var(--vs-text);

    font-family: inherit;
    font-size: 11px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background .16s ease,
        color .16s ease,
        border-color .16s ease,
        transform .16s ease;
}


.vs-service-calendar-day:hover {
    border-color: rgba(196, 0, 0, .25);
    background: rgba(196, 0, 0, .055);
    color: var(--vs-red);

    transform: translateY(-1px);
}


.vs-service-calendar-day.is-today {
    border-color: rgba(23, 43, 77, .22);
}


.vs-service-calendar-day.is-selected {
    border-color: var(--vs-red);
    background: var(--vs-red);
    color: #fff;

    box-shadow:
        0 5px 12px rgba(196, 0, 0, .18);
}


.vs-service-calendar-day.is-outside {
    visibility: hidden;
    pointer-events: none;
}


.vs-service-calendar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;

    margin-top: 10px;
    padding-top: 9px;

    border-top: 1px solid #edf0f4;
}


.vs-service-calendar-today {
    border: 0;

    padding: 5px 0;

    background: transparent;
    color: var(--vs-red);

    font-family: inherit;
    font-size: 10px;
    font-weight: 800;

    cursor: pointer;
}


.vs-service-calendar-note {
    color: #98a2af;

    font-size: 9px;
    font-weight: 600;
}


.vs-service-date-help,
.vs-service-time-sync {
    display: block;

    margin-top: 5px;

    color: #98a2af;

    font-size: 10px;
    font-weight: 500;

    line-height: 1.7;

    text-align: right;
}


.vs-service-time-field input[type="time"] {
    direction: ltr;
    text-align: center;

    font-variant-numeric: tabular-nums;

    cursor: default;
}


.vs-service-time-field input[type="time"][readonly] {
    background: #fbfcfe;
}


.vs-service-time-sync.is-synced {
    color: #176b38;
}


.vs-service-time-sync.is-fallback {
    color: #8a96a4;
}


/* =========================================================
 * Mobile
 * ========================================================= */

@media (max-width: 720px) {

    .vismart-service-request-card {
        padding: 20px 16px;
        border-radius: 18px;
    }


    .vismart-service-request-header {
        align-items: flex-start;
        gap: 12px;

        margin-bottom: 19px;
    }


    .vismart-service-request-icon {
        width: 48px;
        height: 48px;

        flex-basis: 48px;

        border-radius: 13px;
    }


    .vismart-service-request-heading h2 {
        font-size: 20px;
    }


    .vismart-service-request-heading p {
        font-size: 11px;
    }


    .vs-service-grid-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }


    .vs-service-field {
        margin-bottom: 11px;
    }


    .vs-service-recaptcha-wrap {
        justify-content: flex-start;
    }


    .vs-service-submit-row {
        justify-content: stretch;
    }


    .vs-service-submit {
        width: 100%;
    }


    .vs-service-calendar {
        right: 50%;

        transform: translateX(50%);

        width: min(340px, calc(100vw - 32px));
    }

}


@media (prefers-reduced-motion: reduce) {

    .vismart-service-request-icon,
    .vs-service-field input,
    .vs-service-field select,
    .vs-service-file-box,
    .vs-service-submit,
    .vs-service-submit-icon,
    .vs-service-date-display,
    .vs-service-calendar-nav,
    .vs-service-calendar-day,
    .vs-service-recaptcha-loading-text {
        transition: none !important;
    }


    .vs-service-loader {
        animation: none !important;
    }

}