/* ──────────────────────────────────────────
   Hotel Gift Voucher – Front-end Styles
   ────────────────────────────────────────── */

.hgv-wrapper {
    max-width: 920px;
    margin: 0 auto;
    font-family: inherit;
}

/* Alert */
.hgv-alert {
    padding: 14px 18px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 15px;
}
.hgv-alert.success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.hgv-alert.error   { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }

/* Section */
.hgv-section {
    background: #fff;
    
    border-radius: 6px;
    padding: 28px 30px;
    margin-bottom: 20px;
}
.hgv-section-title {
    font-size: 1.75rem;
    font-weight: 400;
    color: #1a3557;
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ccc;
}

/* Fields */
.hgv-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 560px) {
    .hgv-row { grid-template-columns: 1fr; }
}
.hgv-field { margin-bottom: 16px; }
.hgv-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}
.hgv-field label .req { color: #c62828; }
.hgv-field input,
.hgv-field select,
.hgv-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 15px;
    transition: border-color .2s;
    background: #fafafa;
}
.hgv-field input:focus,
.hgv-field select:focus,
.hgv-field textarea:focus {
    outline: none;
    border-color: #1a3557;
    background: #fff;
}
.hgv-field input.invalid,
.hgv-field select.invalid,
.hgv-field textarea.invalid {
    border-color: #e53935;
}

/* Delivery & notice */
.hgv-delivery-note {
    
    border-radius: 4px;
    padding: 14px 18px;
    font-size: 14px;
    margin-bottom: 16px;
    color: #222;
}
.hgv-notice {
   border-radius: 4px;
  padding: 14px 18px;
  font-size: 13px;
  color: #222;
  margin-bottom: 20px;
  font-weight: 600;
}
.hgv-notice p { margin: 0 0 4px; }

/* Submit */
.hgv-submit-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}
.hgv-submit-wrap button {
  min-width: 300px !important;
}
.hgv-submit-wrap.ctws-jcc {
  justify-content: center;
  padding: 26px;
}
.hgv-submit-wrap.ctws-jcc img {
  max-height: 35px;
}
.hgv-btn {
    background: #1a3557;
    color: #fff;
    border: none;
    padding: 14px 32px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background .2s;
}
.hgv-btn:hover   { background: #0f2239; }
.hgv-btn:disabled { opacity: .6; cursor: not-allowed; }

/* Spinner */
.hgv-spinner {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 3px solid #ccc;
    border-top-color: #1a3557;
    border-radius: 50%;
    animation: hgv-spin .7s linear infinite;
}
@keyframes hgv-spin { to { transform: rotate(360deg); } }


/* ==========================================================
   Hotel Gift Voucher form — #hgv-form
   Scoped with the form ID so theme styles don't override it.
   ========================================================== */

#hgv-form {
    --hgv-navy: #1b3557;
    --hgv-navy-dark: #12263f;
    --hgv-gold: #b8955a;
    --hgv-text: #2b2b2b;
    --hgv-muted: #6b7280;
    --hgv-border: #d9dde3;
    --hgv-bg: #ffffff;
    --hgv-field-bg: #fbfbfc;
    --hgv-radius: 6px;

    max-width: 820px;
    margin: 0 auto;
    padding: 40px 44px;
    background: var(--hgv-bg);
    border: 1px solid #eceef1;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(18, 38, 63, 0.06);
    color: var(--hgv-text);
    font-size: 15px;
    line-height: 1.5;
    box-sizing: border-box;
}

#hgv-form *,
#hgv-form *::before,
#hgv-form *::after {
    box-sizing: border-box;
}

/* ---------- Heading ---------- */
#hgv-form h2 {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 400;
    letter-spacing: 0.2px;
    color: var(--hgv-navy);
    text-align: center;
}

#hgv-form h2 + br {
    display: none;
}

/* ---------- Sections ---------- */
#hgv-form .hgv-section {
    margin: 0 0 34px;
}

#hgv-form .hgv-section:first-child {
    margin-top: 0;
}

#hgv-form .hgv-section-title {
    position: relative;
    margin: 28px 0 20px;
    padding: 0 0 10px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--hgv-navy);
    border-bottom: 1px solid var(--hgv-border);
}

#hgv-form .hgv-section-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 48px;
    height: 2px;
    background: var(--hgv-gold);
}

/* ---------- Rows / fields ---------- */
#hgv-form .hgv-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
}

#hgv-form .hgv-field {
    display: flex;
    flex-direction: column;
    margin: 0 0 18px;
}

#hgv-form label {
    display: block;
    margin: 0 0 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--hgv-text);
    letter-spacing: 0.2px;
}

#hgv-form .req {
    color: #c0392b;
    margin-left: 2px;
}

#hgv-form input[type="text"],
#hgv-form input[type="email"],
#hgv-form input[type="tel"],
#hgv-form input[type="number"],
#hgv-form select,
#hgv-form textarea {
    width: 100%;
    height: 48px;
    margin: 0;
    padding: 0 14px;
    font-family: inherit;
    font-size: 15px;
    color: var(--hgv-text);
    background-color: var(--hgv-field-bg);
    border: 1px solid var(--hgv-border);
    border-radius: var(--hgv-radius);
    box-shadow: none;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
    -webkit-appearance: none;
    appearance: none;
}

#hgv-form textarea {
    height: auto;
    min-height: 120px;
    padding: 12px 14px;
    resize: vertical;
}

/* Custom select arrow */
#hgv-form select {
    padding-right: 42px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%231b3557' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px 8px;
}

#hgv-form select::-ms-expand {
    display: none;
}

#hgv-form input:hover,
#hgv-form select:hover,
#hgv-form textarea:hover {
    border-color: #b9c0ca;
}

#hgv-form input:focus,
#hgv-form select:focus,
#hgv-form textarea:focus {
    background-color: #fff;
    border-color: var(--hgv-navy);
    box-shadow: 0 0 0 3px rgba(27, 53, 87, 0.12);
}

#hgv-form ::placeholder {
    color: #a0a6b0;
}

/* Invalid state (works with JS that adds .hgv-error or aria-invalid) */
#hgv-form .hgv-error,
#hgv-form [aria-invalid="true"] {
    border-color: #c0392b !important;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1) !important;
}

/* ---------- Delivery note & notice ---------- */
#hgv-form .hgv-delivery-note {
    margin: 8px 0 16px;
    padding: 14px 18px;
    font-size: 14px;
    color: var(--hgv-text);
    background: #f4f6f9;
    border-left: 3px solid var(--hgv-navy);
    border-radius: 0 var(--hgv-radius) var(--hgv-radius) 0;
}

#hgv-form .hgv-delivery-note strong {
    color: var(--hgv-navy);
    margin-right: 4px;
}

#hgv-form .hgv-notice {
    margin: 0 0 28px;
    padding: 14px 18px;
    background: #fbf8f2;
    border: 1px solid #efe5d3;
    border-radius: var(--hgv-radius);
}

#hgv-form .hgv-notice p {
    margin: 0 0 6px;
    font-size: 13px;
    line-height: 1.55;
    color: #5a5a5a;
}

#hgv-form .hgv-notice p:last-child {
    margin-bottom: 0;
}

#hgv-form .hgv-notice p:first-child {
    margin-bottom: 8px;
}

#hgv-form .hgv-notice strong {
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--hgv-gold);
}

/* ---------- Submit ---------- */
#hgv-form .hgv-submit-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

#hgv-form .hgv-btn {
    min-width: 260px;
    height: 52px;
    padding: 0 36px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: #fff;
    background: var(--hgv-navy);
    border: 0;
    border-radius: var(--hgv-radius);
    cursor: pointer;
    transition: background .2s ease, transform .15s ease, box-shadow .2s ease;
}

#hgv-form .hgv-btn:hover {
    background: var(--hgv-navy-dark);
    box-shadow: 0 8px 18px rgba(18, 38, 63, 0.18);
}

#hgv-form .hgv-btn:active {
    transform: translateY(1px);
}

#hgv-form .hgv-btn:focus-visible {
    outline: 3px solid rgba(184, 149, 90, 0.5);
    outline-offset: 2px;
}

#hgv-form .hgv-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
    box-shadow: none;
}

/* Spinner (shown by your JS via style="display:inline-block") */
#hgv-form .hgv-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(27, 53, 87, 0.15);
    border-top-color: var(--hgv-navy);
    border-radius: 50%;
    animation: hgv-spin .8s linear infinite;
}

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




/* JCC payment logo */
#hgv-form .hgv-submit-wrap.ctws-jcc {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #eef0f3;
}

#hgv-form .ctws-jcc img {
    max-width: 220px;
    height: auto;
    opacity: .9;
}

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
    #hgv-form {
        padding: 26px 18px;
        border-radius: 8px;
    }

    #hgv-form h2 {
        font-size: 22px;
    }

    #hgv-form .hgv-row {
        grid-template-columns: 1fr;
    }

    #hgv-form .hgv-btn {
        width: 100%;
        min-width: 0;
    }

    /* Prevent iOS zoom on focus */
    #hgv-form input,
    #hgv-form select,
    #hgv-form textarea {
        font-size: 16px;
    }
}
