/* ==============================================
   WPA - Trigger button
   ============================================== */
a.wpa-trigger {
    margin: 0 0.5em 0 0.5em;
    font-size: 0.8em;
    border-bottom: 1px dashed;
    cursor: pointer;
    text-decoration: none !important;
    -webkit-box-shadow: none !important;
    box-shadow: none !important;
    display: inline-block;
    line-height: initial;
    vertical-align: text-bottom;
    margin-bottom: 0.25em;
}

.wpa-inloop > a.wpa-trigger {
    font-size: 1em;
}

a.wpa-trigger:hover {
    border-bottom: 1px solid !important;
    font-weight: 700 !important;
}

/* ==============================================
   WPA - Overlay background
   ============================================== */
.wpa-bg {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    z-index: 10000000;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 60px;
    box-sizing: border-box;
}

.wpa-bg.wpa-popup {
    display: flex;
}

/* ==============================================
   WPA - Modal container
   ============================================== */
.wpa-form {
    background: #fff;
    width: 100%;
    max-width: 480px;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    position: relative;
}

/* ==============================================
   WPA - Modal header — uses theme accent color
   ============================================== */
.wpa-form-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background-color: #000!important;
    color: #fff;
    margin: 0;
    box-sizing: border-box;
}

.wpa-form-title {
    font-size: 1em;
    font-weight: 600;
    line-height: 1.4;
    color: #fff;
}

/* ==============================================
   WPA - Close button
   ============================================== */
.wpa-close {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    cursor: pointer;
    font-style: normal !important;
    color: rgba(255, 255, 255, 0.8);
    line-height: 22px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.wpa-close:hover {
    color: #fff;
}

.wpa-close:after {
    content: '\02715';
}

/* ==============================================
   WPA - Form body
   ============================================== */
.wpa-form-body {
    padding: 24px 24px 16px;
}

/* ==============================================
   WPA - Fields
   ============================================== */
.wpa-field {
    margin-bottom: 16px;
}

.wpa-field label {
    display: block;
    font-size: 0.875em;
    font-weight: 600;
    margin-bottom: 6px;
    color: inherit;
}

.wpa-req {
    color: red;
    padding-left: 2px;
    font-weight: bold;
}

/* Inputs & selects inherit WooCommerce/theme styles */
.wpa-field .wpa-input,
.wpa-field input.wpa-input,
.wpa-field select.wpa-input {
    width: 100%;
    box-sizing: border-box;
}

/* ==============================================
   WPA - Submit button — inherits theme .button.alt
   ============================================== */
.wpa-field-submit {
    margin-top: 20px;
    margin-bottom: 8px;
}

button.wpa-submit-btn {
    width: 100%;
    display: block;
    text-align: center;
}

/* ==============================================
   WPA - Privacy text
   ============================================== */
small.wpa-small {
    display: block;
    font-size: 0.8em;
    line-height: 1.4;
    color: #767676;
}

small.wpa-small a {
    text-decoration: underline;
}

/* ==============================================
   WPA - Messages
   ============================================== */
.wpa-msg {
    padding: 0.33em !important;
    line-height: 1.33em !important;
    font-size: 0.85em !important;
}

.wpa-msg.woocommerce-message::before {
    content: " " !important;
}

.wpa-field > .wpa-msg {
    margin-bottom: 0.25em;
}

/* ==============================================
   WPA - Variation gallery
   ============================================== */
.wpa-gal {
    width: 100%;
}

.wpa-img {
    margin: 0.5em auto 0;
    max-width: 100px !important;
}

.wpa-field.wcpt-hidden,
.wpa-img.wcpt-hidden {
    display: none;
}

/* ==============================================
   WPA - reCAPTCHA
   ============================================== */
#wpa-recaptcha {
    position: absolute;
    z-index: 10000001;
    display: none;
}

#wpa-recaptcha .grecaptcha-badge {
    opacity: 0.7;
}

#wpa-recaptcha .grecaptcha-badge:hover {
    opacity: 1;
}

/* ==============================================
   WPA - In-loop (shop archive)
   ============================================== */
.wpa-inloop > .wpa-bg {
    position: fixed;
}

/* ==============================================
   WPA - Responsive
   ============================================== */
@media only screen and (max-width: 520px) {
    .wpa-bg {
        padding-top: 0;
        align-items: flex-end;
    }

    .wpa-form {
        max-width: 100%;
        border-radius: 12px 12px 0 0;
        max-height: 92vh;
    }
}
