/* WS Withdrawal - Frontend Styles */

.wswd-withdrawal-button-wrapper {
    margin: 1em 0;
}

.wswd-withdrawal-button,
.wswd-withdrawal-button:hover,
.wswd-withdrawal-button:focus,
.wswd-withdrawal-button:active,
.wswd-withdrawal-button:visited {
    text-decoration: none !important;
}

.wswd-withdrawal-form {
    max-width: 600px;
    margin: 0 auto;
}

/* Honeypot field: hidden from humans (and skipped by screen readers via
   aria-hidden), but present in the DOM so bots fill it. */
.wswd-withdrawal-form .wswd-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.wswd-withdrawal-form h2 {
    margin-bottom: 1em;
    font-size: 1.5em;
}

.wswd-form-intro {
    margin-bottom: 1.5em;
    color: var(--wc-subtext, #767676);
}

/* Fields match WC .form-row pattern */
.wswd-withdrawal-form .wswd-form-field {
    margin: 0 0 1em;
    padding: 0;
    clear: both;
}

.wswd-withdrawal-form .wswd-form-field label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: 600;
    line-height: 1.5;
}

.wswd-withdrawal-form .wswd-form-field label .required {
    color: var(--wc-red, #a00);
    font-weight: 700;
}

.wswd-withdrawal-form .wswd-form-field input[type="text"],
.wswd-withdrawal-form .wswd-form-field input[type="email"] {
    display: block;
    width: 100%;
    padding: 0.5em;
    background-color: var(--wc-form-color-background, #fff);
    border: var(--wc-form-border-width, 1px) solid var(--wc-form-border-color, rgba(32, 7, 7, 0.8));
    border-radius: var(--wc-form-border-radius, 4px);
    color: var(--wc-form-color-text, #000);
    font-family: inherit;
    font-size: 1em;
    box-sizing: border-box;
    margin: 0;
}

.wswd-withdrawal-form .wswd-form-field input[type="text"]:focus,
.wswd-withdrawal-form .wswd-form-field input[type="email"]:focus {
    outline: none;
    border-color: currentColor;
}

.wswd-form-checkbox label {
    font-weight: normal;
}

.wswd-form-submit {
    margin-top: 1.5em;
}

.wswd-form-submit .button,
.wswd-form-submit .woocommerce-button {
    margin-right: 0.5em;
}

/* Confirmation review table */
.wswd-confirmation-details {
    width: 100%;
    margin: 1em 0 1.5em;
    border-collapse: collapse;
    border-top: 1px solid var(--wc-form-border-color, rgba(32, 7, 7, 0.2));
}

.wswd-confirmation-details th,
.wswd-confirmation-details td {
    padding: 0.75em 0.5em;
    border-bottom: 1px solid var(--wc-form-border-color, rgba(32, 7, 7, 0.2));
    text-align: left;
}

.wswd-confirmation-details th {
    width: 35%;
    font-weight: 600;
}

/* Success / complete */
.wswd-withdrawal-complete {
    max-width: 600px;
    margin: 2em auto;
    padding: 2em;
    background-color: var(--wc-content-bg, #fff);
    border: 1px solid var(--wc-form-border-color, rgba(32, 7, 7, 0.2));
    border-radius: var(--wc-card-border-radius, 8px);
    text-align: center;
}

.wswd-withdrawal-complete h2 {
    color: var(--wc-green, #008a20);
    margin-bottom: 1em;
}

/* Notices (info / error)
   Self-contained so they never depend on WooCommerce's icon font, which is not
   loaded on every theme and was causing the icon to overlap the text. The icon
   is a flex item, so it can never sit on top of the message. */
.wswd-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.7em;
    margin: 1em 0;
    padding: 1em 1.25em;
    border: 1px solid var(--wc-form-border-color, rgba(32, 7, 7, 0.15));
    border-left: 4px solid var(--wswd-notice-accent, #767676);
    border-radius: var(--wc-form-border-radius, 4px);
    background-color: var(--wc-content-bg, #fff);
    line-height: 1.5;
}

.wswd-notice::before {
    content: "i";
    flex: 0 0 auto;
    width: 1.4em;
    height: 1.4em;
    margin-top: 0.05em;
    border-radius: 50%;
    background-color: var(--wswd-notice-accent, #767676);
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-style: normal;
    font-weight: 700;
    font-size: 0.9em;
    line-height: 1.4em;
    text-align: center;
}

.wswd-notice--info {
    --wswd-notice-accent: #2563eb;
}

.wswd-notice--error {
    --wswd-notice-accent: #dc2626;
}

.wswd-notice--error::before {
    content: "!";
}
