/* Right of Withdrawal for WooCommerce — Frontend
   Designed to inherit the active theme where possible (WooCommerce form
   classes + .wp-element-button), with a clean, neutral fallback so it looks
   intentional on any theme. Uses currentColor / theme variables where available. */

.arw-guest-form-wrap,
.arw-regret-form,
.arw-case-status {
    max-width: 640px;
    margin: 0 auto;
}

/* ---- Card-ish grouping that stays neutral on light or dark themes ---- */
.arw-guest-form-wrap .arw-step,
.arw-regret-form,
.arw-case-status {
    border: 1px solid rgba(0,0,0,.10);
    border-radius: 10px;
    padding: clamp(18px, 4vw, 28px);
    background: rgba(0,0,0,.015);
}
.arw-guest-form-wrap .arw-step + .arw-step { margin-top: 0; }

.arw-guest-form-wrap h3,
.arw-regret-form h3,
.arw-case-status h3 {
    margin: 0 0 .35em;
    line-height: 1.2;
}
.arw-guest-form-wrap p { margin: 0 0 1em; }

/* ---- Labels & fields ---- */
.arw-guest-form-wrap label,
.arw-regret-form label {
    display: block;
    font-weight: 600;
    margin-bottom: .35em;
    font-size: .95em;
}
.arw-guest-form-wrap input.input-text,
.arw-guest-form-wrap textarea,
.arw-regret-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: .7em .85em;
    border: 1px solid rgba(0,0,0,.20);
    border-radius: 8px;
    background: #fff;
    color: inherit;
    font: inherit;
    line-height: 1.4;
    transition: border-color .15s, box-shadow .15s;
}
.arw-guest-form-wrap input.input-text:focus,
.arw-guest-form-wrap textarea:focus,
.arw-regret-form textarea:focus {
    outline: none;
    border-color: currentColor;
    box-shadow: 0 0 0 3px rgba(0,0,0,.06);
}

/* ---- Buttons ----
   .wp-element-button makes the theme style these as its own buttons.
   The rules below are a graceful fallback ONLY when the theme provides none. */
.arw-btn {
    display: inline-block;
    cursor: pointer;
    padding: .75em 1.4em;
    border-radius: 8px;
    border: 1px solid currentColor;
    font: inherit;
    font-weight: 600;
    line-height: 1.2;
    transition: transform .05s ease, opacity .15s ease, background .15s ease;
}
.arw-btn:active { transform: translateY(1px); }
/* Only paint our fallback colors if the theme didn't (detected via no background) */
.arw-btn-ghost { background: transparent; opacity: .85; }
.arw-btn-ghost:hover { opacity: 1; }

/* Spacing between stacked buttons */
.arw-guest-form-wrap .arw-btn + .arw-btn { margin-top: 0; }

/* ---- Order preview / summary tables: inherit theme table styling ---- */
.arw-order-summary {
    border: 1px solid rgba(0,0,0,.10);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 20px;
    background: rgba(0,0,0,.02);
}
.arw-full-order-notice {
    margin: 0 0 1em;
    padding: 12px 14px;
    border-left: 3px solid rgba(0,0,0,.25);
    background: rgba(0,0,0,.04);
    border-radius: 0 8px 8px 0;
    font-size: .95em;
}
#arw-order-preview table,
.arw-regret-form table.shop_table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}
#arw-order-preview th, #arw-order-preview td,
.arw-regret-form table.shop_table th,
.arw-regret-form table.shop_table td {
    padding: .6em .5em;
    border-bottom: 1px solid rgba(0,0,0,.08);
    text-align: left;
}

.arw-gdpr { font-size: .85em; opacity: .7; margin: 1em 0; }

/* ---- Messages ---- */
.arw-message {
    padding: .8em 1em;
    border-radius: 8px;
    margin-bottom: 1em;
    border: 1px solid transparent;
}
.arw-message.arw-error   { background: #fdecea; border-color: #e0b4ae; color: #9b2c1f; }
.arw-message.arw-success { background: #e9f6ec; border-color: #acd6b6; color: #1f6b32; }

.arw-success {
    text-align: center;
    padding: 32px 24px;
    background: #e9f6ec;
    border: 1px solid #acd6b6;
    border-radius: 10px;
    color: #1f6b32;
}
.arw-success h3 { color: inherit; }

/* ---- Status badges ---- */
.arw-status {
    display: inline-block;
    padding: .2em .7em;
    border-radius: 999px;
    font-size: .82em;
    font-weight: 600;
    line-height: 1.5;
}
.arw-status-inkommen  { background: #e3f0ff; color: #1a5fa8; }
.arw-status-handlaggs { background: #fff4e0; color: #8a5700; }
.arw-status-godkand   { background: #e6f4ea; color: #1a6b2e; }
.arw-status-nekad     { background: #fdecea; color: #9b2c1f; }
.arw-status-avslutad  { background: #eee;    color: #555; }

/* ---- Support contact block ---- */
.arw-contact-block {
    margin-top: 24px;
    padding: 16px 18px;
    border: 1px solid rgba(0,0,0,.10);
    border-radius: 8px;
    background: rgba(0,0,0,.02);
    font-size: .92em;
}
.arw-contact-block__title {
    margin: 0 0 .6em;
    font-size: 1em;
    font-weight: 600;
    line-height: 1.3;
}
.arw-contact-block__list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.arw-contact-block__list li + li {
    margin-top: .45em;
}
.arw-contact-block__label {
    font-weight: 600;
    margin-right: .35em;
}
.arw-contact-block a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.arw-contact-block a:hover {
    opacity: .85;
}

/* Dark-theme friendliness: if the page text is light, soften our hairlines */
@media (prefers-color-scheme: dark) {
    .arw-guest-form-wrap .arw-step,
    .arw-regret-form, .arw-case-status,
    .arw-order-summary,
    .arw-contact-block {
        border-color: rgba(255,255,255,.14);
        background: rgba(255,255,255,.03);
    }
    .arw-guest-form-wrap input.input-text,
    .arw-guest-form-wrap textarea,
    .arw-regret-form textarea {
        background: rgba(255,255,255,.06);
        border-color: rgba(255,255,255,.22);
    }
}

/* ---- Partial withdrawal checkboxes ---- */
.arw-col-select { width: 72px; text-align: center; }

/* ---- Footer link (free) ---- */
.arw-footer-link-wrap {
    text-align: center;
    padding: 12px 16px 20px;
    font-size: .88em;
}
.arw-footer-link {
    color: inherit;
    opacity: .75;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.arw-footer-link:hover { opacity: 1; }

/* ---- Sticky bar (Pro; colors set inline from settings) ---- */
.arw-sticky-bar {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 99999;
    display: flex;
    justify-content: center;
    padding: 10px 16px;
}
.arw-sticky-bar--bottom {
    bottom: 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,.18);
}
.arw-sticky-bar--top {
    top: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,.18);
}
body.admin-bar .arw-sticky-bar--top { top: 32px; }
@media (max-width: 782px) {
    body.admin-bar .arw-sticky-bar--top { top: 46px; }
}
.arw-sticky-bar__link {
    font-weight: 600;
    text-decoration: none;
    padding: .55em 1.2em;
    border: 1px solid;
    border-radius: 999px;
}
.arw-sticky-bar__link:hover,
.arw-sticky-bar__link:focus {
    opacity: .88;
}
