﻿/* =============================================================================
   XLR8ed Enrollment Voucher — Frontend Styles
   ============================================================================= */
/* -------------------------------------------------------------------------
   Outer container
   Force full-width row even inside flex/grid add-to-cart forms (OceanWP etc.)
   ------------------------------------------------------------------------- */
.xlr8ed-voucher-flow {
    flex-basis: 100%;
    order: 10;
    width: 100%;
    margin-top: 24px;
    padding: 22px 24px;
    border: 1px solid #dde3ea;
    border-radius: 8px;
    background: #fafbfc;
    box-sizing: border-box;
}
/* -------------------------------------------------------------------------
   Step block
   ------------------------------------------------------------------------- */
.xlr8ed-step {
    margin-bottom: 22px;
}
.xlr8ed-step:last-child {
    margin-bottom: 0;
}
.xlr8ed-step-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 14px;
    color: #1a2e4a;
    letter-spacing: 0.2px;
}
/* -------------------------------------------------------------------------
   Step 1 — Course Access Duration read-only display
   ------------------------------------------------------------------------- */
.xlr8ed-display-input {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #a8c4d5;
    border-radius: 6px;
    background: #ffffff;
    font-size: 14px;
    color: #333;
    box-sizing: border-box;
    min-height: 44px;
    line-height: 1.4;
}
/* -------------------------------------------------------------------------
   Step 2 — Access type buttons
   ------------------------------------------------------------------------- */
.xlr8ed-access-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.xlr8ed-access-btn input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
.xlr8ed-access-btn {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    padding: 13px 18px !important;
    border: 1px solid #a8c4d5 !important;
    border-radius: 6px !important;
    background: #ffffff !important;
    font-size: 14px !important;
    color: #1a2e4a !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease !important;
    user-select: none;
    font-weight: 500 !important;
    text-align: left !important;
    line-height: 1.4 !important;
}
.xlr8ed-access-btn:hover {
    border-color: #c8892a !important;
    background: #fff9ee !important;
    color: #1a2e4a !important;
}
.xlr8ed-btn-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.75;
}
.xlr8ed-access-btn.xlr8ed-selected {
    background: #c8892a !important;
    border-color: #c8892a !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}
.xlr8ed-access-btn.xlr8ed-selected .xlr8ed-btn-icon {
    opacity: 1;
}
/* -------------------------------------------------------------------------
   Step 3 — Enrollment count input
   ------------------------------------------------------------------------- */
.xlr8ed-count-input {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #a8c4d5;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    background: #ffffff;
    box-sizing: border-box;
    -moz-appearance: textfield;
    appearance: textfield;
}
.xlr8ed-count-input::-webkit-outer-spin-button,
.xlr8ed-count-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}
.xlr8ed-count-input:focus {
    border-color: #c8892a;
    outline: none;
    box-shadow: 0 0 0 3px rgba(200, 137, 42, 0.15);
}
/* -------------------------------------------------------------------------
   Step 4 — Recipient blocks
   ------------------------------------------------------------------------- */
.xlr8ed-recipient-block {
    background: #ffffff;
    border: 1px solid #dde3ea;
    border-radius: 6px;
    padding: 16px 18px;
    margin-bottom: 12px;
}
.xlr8ed-recipient-block:last-child {
    margin-bottom: 0;
}
.xlr8ed-field-group {
    margin-bottom: 10px;
    position: relative;
}
.xlr8ed-field-group:last-child {
    margin-bottom: 0;
}
.xlr8ed-input {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #a8c4d5;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    background: #ffffff;
    box-sizing: border-box;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.xlr8ed-input:focus {
    border-color: #c8892a;
    outline: none;
    box-shadow: 0 0 0 3px rgba(200, 137, 42, 0.15);
}
.xlr8ed-input.xlr8ed-error {
    border-color: #d0021b;
    background: #fff5f5;
}
.xlr8ed-field-error {
    display: block;
    font-size: 12px;
    color: #d0021b;
    margin-top: 4px;
}
/* -------------------------------------------------------------------------
   Proceed to Secure Checkout button
   High-specificity selectors override OceanWP / theme button defaults
   ------------------------------------------------------------------------- */
#xlr8ed-proceed-wrap {
    margin-top: 16px;
}
form.cart #xlr8ed-proceed-wrap button.xlr8ed-proceed-btn,
form.cart button.xlr8ed-proceed-btn,
#xlr8ed-proceed-wrap button.xlr8ed-proceed-btn,
button.xlr8ed-proceed-btn {
    display: block !important;
    width: 100% !important;
    padding: 15px 20px !important;
    background: #c8892a !important;
    background-color: #c8892a !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    text-align: center !important;
    cursor: pointer !important;
    letter-spacing: 0.2px !important;
    transition: background 0.18s ease !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
    text-transform: none !important;
    line-height: 1.4 !important;
}
form.cart #xlr8ed-proceed-wrap button.xlr8ed-proceed-btn:hover,
form.cart button.xlr8ed-proceed-btn:hover,
#xlr8ed-proceed-wrap button.xlr8ed-proceed-btn:hover,
button.xlr8ed-proceed-btn:hover {
    background: #b07820 !important;
    background-color: #b07820 !important;
    color: #ffffff !important;
}
/* -------------------------------------------------------------------------
   Voucher note (below Proceed button)
   ------------------------------------------------------------------------- */
.xlr8ed-voucher-note {
    font-size: 13px;
    color: #445566;
    background: #f0f6ff;
    border-left: 3px solid #1a2e4a;
    padding: 11px 16px;
    border-radius: 0 5px 5px 0;
    margin-top: 14px;
    line-height: 1.5;
}
/* -------------------------------------------------------------------------
   Accessibility — screen-reader only labels
   ------------------------------------------------------------------------- */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */
@media ( max-width: 600px ) {
    .xlr8ed-voucher-flow {
        padding: 16px;
    }
    .xlr8ed-access-btn {
        padding: 12px 14px !important;
        font-size: 13px !important;
    }
    form.cart button.xlr8ed-proceed-btn,
    button.xlr8ed-proceed-btn {
        font-size: 14px !important;
        padding: 14px !important;
    }
}
