/* ==========================================================================
   ENQUIRE MODAL  (shared)

   Markup: resources/views/frontend/partials/course-enquiry-modal.blade.php,
   included by the course-details page, the home page's Upcoming Course
   Schedules section and the /schedules page. Built on Bootstrap 5's modal,
   with every default surface restyled below.

   Lived at the bottom of course-details.css until the schedules section needed
   the same modal; the rules are unchanged, only the file they sit in.
   ========================================================================== */
.hm-enq .modal-dialog {
    max-width: 1050px;
    margin: 1rem auto;
}

/* Bootstrap's own .modal.fade .modal-dialog only translates; the design calls
   for a scale, so the transition is redefined rather than added to. */
.hm-enq.fade .modal-dialog {
    opacity: 0;
    transform: scale(.92);
    transition:
        transform .35s cubic-bezier(.22, .61, .36, 1),
        opacity .35s cubic-bezier(.22, .61, .36, 1);
}

.hm-enq.show .modal-dialog {
    opacity: 1;
    transform: scale(1);
}

.hm-enq .modal-content {
    position: relative;
    border: 0;
    border-radius: 24px;
    overflow: hidden;           /* lets the panels square off against the radius */
    background: #FFFFFF;
    box-shadow: 0 40px 90px rgba(42, 29, 20, .28);
}

.hm-enq .modal-backdrop.show { opacity: .45; }

/* ---- Close ---- */
.hm-enq__close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    font-size: 13px;
    color: #23180F;
    background: #FFFFFF;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(42, 29, 20, .16);
    transition: transform .3s var(--hm-ease, cubic-bezier(.22, .7, .2, 1));
}

.hm-enq__close:hover,
.hm-enq__close:focus-visible { transform: rotate(90deg); }

/* ---- Row: the two panels are equal height, so the cream runs full bleed ---- */
.hm-enq__row {
    --bs-gutter-x: 0;
    --bs-gutter-y: 0;
    min-height: 520px;
}

/* ============================== LEFT PANEL ============================== */
.hm-enq__aside {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 36px 32px 0;
    background: #FFF8EC;
    overflow: hidden;           /* clips the decorations to the panel */
}

.hm-enq__logo {
    width: 160px;
    height: auto;
    margin-bottom: 26px;
}

.hm-enq__title {
    position: relative;
    z-index: 2;
    margin: 0 0 12px;
    font-family: "Poppins", "Geist", system-ui, sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    color: #17161A;
}

.hm-enq__desc {
    position: relative;
    z-index: 2;
    margin: 0;
    font-size: 13px;
    line-height: 1.75;
    color: #6B6357;
}

/* ---- Decorations ---- */
.hm-enq__deco {
    position: absolute;
    z-index: 1;
    pointer-events: none;
    /* Only transform animates — never top/left. */
    animation: hm-enq-float 6s ease-in-out infinite alternate;
}

.hm-enq__deco--dots   { top: 0;     right: 0;   width: 96px;  opacity: .5; animation: none; }
.hm-enq__deco--lines  { top: 45%;   left: -14px; width: 74px; opacity: .45; animation-delay: -3s; }
.hm-enq__deco--star-a { top: 40%;   right: 26%;  width: 30px; opacity: .9; }
.hm-enq__deco--star-b { top: 52%;   left: 16%;   width: 18px; opacity: .8; animation-delay: -2s; }

@keyframes hm-enq-float {
    from { transform: translateY(-6px); }
    to   { transform: translateY(6px); }
}

/* ---- Support figure — bottom-aligned, never cropped or stretched ----
   `margin: auto` on the top edge pushes it to the foot of the flex column; the
   negative sides cancel the panel's 32px padding so the cut-out spans the panel
   edge to edge, as designed. width + height:auto keeps its aspect ratio, so it
   is never squashed, and nothing is cropped. */
.hm-enq__figure {
    position: relative;
    z-index: 2;
    margin: auto -32px 0;
    padding-top: 16px;
}

.hm-enq__figure img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* ============================== RIGHT PANEL ============================== */
.hm-enq__main {
    padding: 26px 32px;
    background: #FFFFFF;
}

.hm-enq__form .row {
    --bs-gutter-x: 16px;
    --bs-gutter-y: 0;
}

.hm-enq__field { margin-bottom: 10px; }

.hm-enq__label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 600;
    color: #23180F;
}

/* Every control shares one look — inputs, selects and the textarea. */
.hm-enq__input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    font-size: 13.5px;
    color: #23180F;
    background: #FFFFFF;
    border: 1px solid #E8E8E8;
    border-radius: 10px;
    outline: none;
    transition: border-color .25s ease, box-shadow .25s ease;
}

.hm-enq__input::placeholder { color: #A9A9A9; }

.hm-enq__input:focus {
    border-color: #E9A320;
    box-shadow: 0 0 0 3px rgba(233, 163, 32, .14);
}

/* ---- Select — Bootstrap's default arrow removed for the design's chevron ---- */
.hm-enq__select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2323180F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
    cursor: pointer;
}

/* :invalid is the unchosen placeholder option, so it greys like a placeholder */
.hm-enq__select:invalid { color: #A9A9A9; }
.hm-enq__select option { color: #23180F; }

/* ---- Phone — the +91 chip and the input read as one control ---- */
.hm-enq__phone {
    display: flex;
    align-items: center;
    height: 46px;
    background: #FFFFFF;
    border: 1px solid #E8E8E8;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color .25s ease, box-shadow .25s ease;
}

.hm-enq__phone:focus-within {
    border-color: #E9A320;
    box-shadow: 0 0 0 3px rgba(233, 163, 32, .14);
}

.hm-enq__phone-code {
    display: inline-flex;
    align-items: center;
    align-self: stretch;
    padding: 0 12px;
    font-size: 13.5px;
    color: #6B6357;
    border-right: 1px solid #E8E8E8;
}

/* The wrapper already draws the border and the focus ring. */
.hm-enq__phone .hm-enq__input {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    flex: 1 1 auto;
    min-width: 0;
}

.hm-enq__textarea {
    height: 160px;
    padding: 10px 14px;
    line-height: 1.5;
    resize: vertical;
}

/* ---- Inline validation ---- */
.hm-enq__error {
    display: none;
    margin-top: 5px;
    font-size: 11.5px;
    color: #C0392B;
}

.hm-enq__field.is-invalid .hm-enq__error { display: block; }

.hm-enq__field.is-invalid .hm-enq__input,
.hm-enq__field.is-invalid .hm-enq__phone {
    border-color: #C0392B;
}

.hm-enq__field.is-invalid .hm-enq__input:focus,
.hm-enq__field.is-invalid .hm-enq__phone:focus-within {
    box-shadow: 0 0 0 3px rgba(192, 57, 43, .12);
}

/* ---- Submit ---- */
.hm-enq__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 48px;
    margin-top: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
    background: #7A2F0B;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(122, 47, 11, .26);
    transition:
        transform .3s var(--hm-ease, cubic-bezier(.22, .7, .2, 1)),
        background .3s ease,
        box-shadow .3s ease;
}

.hm-enq__submit:hover,
.hm-enq__submit:focus-visible {
    transform: translateY(-2px);
    background: #63250B;
    box-shadow: 0 16px 32px rgba(122, 47, 11, .34);
}

.hm-enq__submit i { transition: transform .3s var(--hm-ease, cubic-bezier(.22, .7, .2, 1)); }
.hm-enq__submit:hover i { transform: translateX(6px); }

/* ---- Success note ---- */
.hm-enq__note {
    margin: 14px 0 0;
    padding: 11px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #2F6B26;
    background: #EAF6E4;
    border-radius: 10px;
}

/* ============================== RESPONSIVE ============================== */
@media (max-width: 991.98px) {
    /* Left panel stacks above the form. */
    .hm-enq .modal-dialog { max-width: 95%; }
    .hm-enq__row { min-height: 0; }

    .hm-enq__aside {
        padding: 28px 24px 0;
        text-align: center;
    }

    .hm-enq__logo { margin-inline: auto; }
    .hm-enq__desc { max-width: 460px; margin-inline: auto; }

    .hm-enq__figure { max-width: 380px; margin: 18px auto 0; }

    .hm-enq__main { padding: 28px 24px; }
}

@media (max-width: 575.98px) {
    .hm-enq .modal-content { border-radius: 18px; }
    .hm-enq__title { font-size: 21px; }
    .hm-enq__deco--star-a,
    .hm-enq__deco--star-b { display: none; }
}

/* Reduced motion — open plainly, hold the float, keep every state. */
@media (prefers-reduced-motion: reduce) {
    .hm-enq.fade .modal-dialog { transition: none; transform: none; }
    .hm-enq__deco { animation: none; }

    .hm-enq__close,
    .hm-enq__submit { transition: none; }

    .hm-enq__close:hover,
    .hm-enq__submit:hover { transform: none; }
}

/* --------------------------------------------------------------------------
   Applying for a specific batch

   Shown only when the modal was opened from an Apply button in the Upcoming
   Course Schedules table, which names the batch on the trigger; the
   course-details "Enroll Now" flow leaves it hidden.
   -------------------------------------------------------------------------- */
.hm-enq__batch {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    padding: 11px 16px;
    border-radius: 12px;
    background: var(--hm-cream, #FCF8F1);
    border: 1px solid rgba(132, 61, 33, .16);
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--hm-muted, #6D6357);
}

.hm-enq__batch i {
    color: var(--hm-gold-dark, #C6851A);
}

.hm-enq__batch strong {
    font-weight: 700;
    color: #843D21;
}

.hm-enq__batch[hidden] {
    display: none;
}
