/* Leyka Donation Plugin — Minimal Frontend CSS
 * Covers: payment form (Star), donor account, scale, donors list shortcodes.
 * Customize colors and fonts directly in this file.
 */

:root {
    --leyka-accent: #43a047;
    --leyka-accent-dark: #388e3c;
}

/* ===========================
   UTILITIES
   =========================== */

.leyka-hidden { display: none !important; }
.invisible    { visibility: hidden; }

.leyka-spinner-border {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 3px solid #ededed;
    border-top-color: #BBBBBB;
    border-radius: 50%;
    animation: leyka-spin 0.75s linear infinite;
}
.leyka-spinner-border.sm { width: 1.25rem; height: 1.25rem; }
.leyka-spinner-border.xs { width: 1rem;    height: 1rem;    }
@keyframes leyka-spin { to { transform: rotate(360deg); } }


/* ===========================
   PAYMENT FORM — CONTAINER
   =========================== */


.leyka-pf *, .leyka-pf *::before, .leyka-pf *::after { box-sizing: inherit; }
.leyka-payment-form {
    padding: 28px 32px;
    background: #fff;
    border-radius: 26px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}


/* ===========================
   SHELTER HEADER / FOOTER
   =========================== */

.leyka-shelter-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-bottom: 16px;
    text-align: center;
}
.leyka-shelter-logo img {
    display: block;
    width: 70px;
    height: 70px!important;
    object-fit: cover;
}
.leyka-shelter-name { font-size:17px; }

.leyka-shelter-footer { margin-top: 16px;font-size: 13px;color: #757575;font-weight: 500;}
.leyka-shelter-footer a { text-decoration:underline!important; }
.leyka-shelter-footer__support{margin-top:8px;}

.leyka-fundraising-finished {
    text-align: center;
    padding: 24px 16px;
    font-size: 15px;
    font-weight: 500;
}


/* ===========================
   FORM SECTIONS
   =========================== */

.section { margin-bottom: 14px; }
.section.hidden { display: none; }

.section-title-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.section-title-line { flex: 1; height: 1px; background: #ededed; }
.section-title-text {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #aaa;
    white-space: nowrap;
}


/* ===========================
   PERIODICITY TABS
   =========================== */

.section__fields.periodicity { display: flex; gap: 2px; flex-wrap: wrap; }
.section__fields.periodicity a {
    flex: 1;
    display: block;
    text-align: center;
    padding: 14px;
    border: 2px solid var(--leyka-accent, #43a047);
    border-radius:100px;
    font-size: 13px;
    font-weight:500;
    text-transform: uppercase;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.section__fields.periodicity a.active {
    border-color: var(--leyka-accent, #43a047);
    background: var(--leyka-accent, #43a047);
}
.section__fields.periodicity a:hover{color:#000; }


/* ===========================
   CURRENCIES
   =========================== */

.section__fields.currencies { display: flex; gap: 8px; flex-wrap: wrap; }
.section__fields.currencies a {
    display: inline-block;
    padding: 6px 14px;
    border: 2px solid #ededed;
    border-radius: 6px;
    text-decoration: none;
    color: #474747;
    font-size: 0.9em;
}
.section__fields.currencies a.active { border-color: var(--leyka-accent, #43a047); color: var(--leyka-accent, #43a047); font-weight: 600; }


/* ===========================
   AMOUNT SWIPER
   =========================== */

.star-swiper { position: relative; overflow: hidden; }
.star-swiper.no-swipe .swiper-arrow,
.star-swiper.no-swipe .arrow-gradient { display: none; }

.swiper-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 28px;
    height: 28px;
    background: var(--leyka-accent, #43a047);
    border-radius: 50%;
    text-decoration: none;
    display: block;
}
.swiper-arrow.swipe-left  { left: 2px; }
.swiper-arrow.swipe-right { right: 2px; }

.arrow-gradient {
    position: absolute;
    top: 0; bottom: 0;
    width: 48px;
    z-index: 1;
    pointer-events: none;
}
.arrow-gradient.left  { left: 0;  background: linear-gradient(to right, #fff, transparent); }
.arrow-gradient.right { right: 0; background: linear-gradient(to left,  #fff, transparent); }

.swiper-list { display: flex; gap: 8px; flex-wrap: nowrap; overflow: hidden; }
.full-list   { display: flex; gap: 8px; flex-wrap: wrap; }

.swiper-item {
    min-width: 0;
    border: 2px solid var(--leyka-accent, #43a047);
    border-radius: 50px;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.swiper-item:hover    { border-color: var(--leyka-accent, #43a047); }
.swiper-item:active   { background: color-mix(in srgb, var(--leyka-accent, #43a047) 20%, transparent); }
.swiper-item.selected { border-color: var(--leyka-accent, #43a047); background: color-mix(in srgb, var(--leyka-accent, #43a047) 30%, transparent); font-weight: 500; }
.swiper-item.disabled { opacity: 0.4; pointer-events: none; }

/* Fixed amount items stretch equally in a row */
.section--amount .full-list .swiper-item:not(.flex-amount-item) { flex: 1 1 auto; }

/* Custom amount field goes to its own full-width row */
.section--amount .full-list .flex-amount-item {
    flex: 0 0 100%;
    width: 100%;
    border-radius: 50px;
    text-align: left;
}
.section--amount .full-list .flex-amount-item .swiper-item-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 8px 20px;
    gap: 2px;
}
.section--amount .full-list .flex-amount-item .textfield-label {
    font-size: 12px;
    font-weight: 400;
}

.swiper-item-inner { padding: 12px; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 6px; }
.swiper-item .amount   { font-size: 15px; font-weight: 500; }
.swiper-item:not(.flex-amount-item) .currency { font-size: 15px; font-weight: 500; }

.flex-amount-item input[type="number"] {
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    font-size: 15px;
    font-weight: 500;
    color: inherit;
    outline: none;
    -moz-appearance: textfield;
    padding: 0;
}
.flex-amount-item input[type="number"]::-webkit-outer-spin-button,
.flex-amount-item input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.section__fields.amount-description { font-size: 0.85em; color: #666; margin-top: 6px; }


/* ===========================
   PAYMENT METHODS GRID
   =========================== */

/* Column layout: each payment method takes full width, stacked vertically */
.payments-grid .full-list {
    flex-direction: column;
    gap: 8px;
}

/* Remove swiper-item's default border/radius inside payments grid — payment-opt handles styling */
.payments-grid .full-list .swiper-item {
    border: none;
    border-radius: 0;
    min-width: unset;
    width: 100%;
}

/* Left-align icon+label inside each row */
.payments-grid .swiper-item-inner {
    justify-content: flex-start;
    padding: 0;
}

.payment-opt {
    width: 100%;
    border: 2px solid #ededed;
    border-radius: 8px;
    transition: border-color 0.15s;
}
.payment-opt.selected { border-color: var(--leyka-accent, #43a047); }
.payment-opt:hover    { border-color: var(--leyka-accent, #43a047); }

.payment-opt__button {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
}
.payment-opt__radio  { display: none; }

.payment-opt__icon { display: flex; justify-content: flex-start; align-items: center; min-height: 36px; min-width: 60px; }
.payment-opt__icon img { max-height: 32px; max-width: 72px; }

.payment-opt__label { display: block; font-size: 0.9em; text-align: left; color: #444; margin-top: 0; }
.payment-opt__label b { font-weight: normal; color: #aaa; }


/* ===========================
   DONOR DATA FIELDS
   =========================== */

.donor__textfield { margin-bottom: 16px; }

.leyka-star-field-frame { display: flex; flex-direction: column; gap: 4px; }
.donor__textfield-label { font-size: 0.85em; color: #666; }

.leyka-star-field-frame input,
.leyka-star-field-frame textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ededed;
    border-radius: 50px;
    font-size: 1em;
    color: #474747;
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
}
.leyka-star-field-frame input:focus,
.leyka-star-field-frame textarea:focus { border-color: var(--leyka-accent, #43a047); }

.leyka-star-field-error-frame { margin-top: 4px; }
.donor__textfield-error { font-size: 0.8em; color: #c0392b; }
.leyka-star-field-description-frame { font-size: 0.8em; color: #aaa; margin-top: 4px; }

.donor__oferta { margin-bottom: 14px; font-size: 13px; color: #000;font-weight:500; }
.donor__oferta a{text-decoration:underline!important;}
.donor__oferta > span { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.donor__oferta label { cursor: pointer; flex: 1; }
.donor__oferta input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: 2px solid var(--leyka-accent, #43a047);
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    margin-top: 2px;
    transition: border-color 0.15s, background 0.15s;
}
.donor__oferta input[type="checkbox"]:checked {
    background: var(--leyka-accent, #43a047);
    border-color: var(--leyka-accent, #43a047);
}
.donor__oferta input[type="checkbox"]:checked::after {
    content: '';
    display: block;
    position: absolute;
    left: 6px;
    top: 3px;
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}
.donor__oferta svg { display: none; }

.donor__submit { margin-top: 12px; }

.leyka-pf input[type="submit"].leyka-default-submit,
.leyka-pf .leyka-pm-form input[type="submit"].leyka-default-submit {
    display: block !important;
    width: 100% !important;
    background: var(--leyka-accent, #43a047) !important;
    background-color: var(--leyka-accent, #43a047) !important;
    border: none !important;
    padding: 14px 20px !important;
    cursor: pointer !important;
    margin-top: 16px !important;
}
.leyka-pf input[type="submit"].leyka-default-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.single-pm-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.single-pm-icon img { height: 24px; width: auto; display: block; }


/* ===========================
   SUBMIT ERRORS
   =========================== */

.leyka-submit-errors {
    margin-top: 12px;
    padding: 14px 16px;
    background: #ffe8eb;
    border-left: 4px solid #e35c6e;
    border-radius: 3px;
}
.leyka-submit-errors .leyka-error {
    color: #d73d54;
    font-size: 14px;
    font-weight:500;
}


/* ===========================
   LOGIN POPUP (guests)
   =========================== */

.leyka-login-popup {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.leyka-login-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.2);
    cursor: pointer;
}
.leyka-login-popup__box {
    position: relative;
    background: #fff;
    border-radius: 26px;
    padding: 40px 48px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
    text-align: center;
    max-width: 340px;
    width: 90%;
}
.leyka-login-popup__close {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 5px !important;
    background: transparent !important;
    font-size: 34px !important;
    font-weight: 300 !important;
    line-height: 20px !important;
}
.leyka-login-popup__close:hover { color: #333; }
.leyka-login-popup__text {
    font-size: 15px;
    font-weight: 500;
}
.leyka-login-popup__text a{
    text-decoration: underline!important;
}
.leyka-login-popup__link:hover { text-decoration: none; }


/* ===========================
   GATEWAY REDIRECT OVERLAY
   =========================== */

.leyka-pf__redirect {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.waiting { display: flex; justify-content: center; align-items: center; width: 100%; height: 100%; }
.waiting__card {
    text-align: center;
    padding: 32px 40px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}
.waiting__card .loading  { margin-bottom: 16px; }
.waiting__card-text { font-size: 0.95em; color: #666; }

.leyka-width-small  .swiper-item { min-width: 64px; }
.leyka-width-medium .swiper-item { min-width: 72px; }


/* ===========================
   SUCCESS / FAILURE SCREENS
   =========================== */

.leyka-pf__final-screen { padding: 24px 0; }
.leyka-screen-thankyou h1 { margin-top: 0; }
.leyka-redirect-countdown { font-weight: 700; }

.leyka-pf__final-error { text-align: center; padding: 24px 0; }
.leyka-pf__final-error .text { font-size: 1.2em; font-weight: 700; margin: 16px 0 8px; }
.leyka-pf__final-error .error-text { font-size: 0.9em; color: #666; margin-bottom: 12px; }
.leyka-pf__final-error a { color: var(--leyka-accent, #43a047); }

.leyka-logo { display: none; }

.leyka-pf__final-thankyou,
.informyou-redirect-text { margin-top: 16px; font-size: 0.9em; color: #666; }


/* ===========================
   DONOR ACCOUNT
   =========================== */

.leyka-screen-form h2 { margin-top: 0; }
.leyka-screen-form > p { color: #666; margin-bottom: 24px; }

.list { margin-bottom: 20px; }
.list-title { font-size: 15px; margin: 0 0 12px; }

.items { display: flex; flex-direction: column; gap: 6px; }
.campaign-title{font-size:15px;}

.item { padding: 14px 16px; border: 1px solid #d5d5d5; border-radius: 8px;background: #fff; }
.item.subscription-canceled { opacity: 0.6; }
.subscribed-campaigns-list .item.active { background: #E2EABF; border-color: #b9c487; }
.subscribed-campaigns-list .item.subscription-canceling { background: #fff8e1; border-color: #ffe082; }

.item-title { display: flex; align-items: baseline; gap: 8px; margin: 0 0 4px;color:#748a15; }

.field-q {
    position: relative;
    display: inline-block;
    width: 16px; height: 16px;
    line-height: 16px;
    text-align: center;
    font-size: 0.75em;
    font-weight: 700;
    color: #fff;
    background: #aaa;
    border-radius: 50%;
    cursor: help;
    flex-shrink: 0;
}
.field-q::before { content: "?"; }

.field-q-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    padding: 8px 10px;
    background: #474747;
    color: #fff;
    font-size: 0.8em;
    border-radius: 6px;
    z-index: 10;
    font-weight: 400;
    line-height: 1.4;
}
.field-q:hover .field-q-tooltip { display: block; }

.payment-type-icon {
    display: inline-block;
    width: 16px; height: 16px;
    background: center/contain no-repeat;
    vertical-align: middle;
    flex-shrink: 0;
    cursor: default;
}
.payment-type-icon.payment-type-single         { background-image: url('../../img/icon-payment-type-single.svg'); }
.payment-type-icon.payment-type-rebill,
.payment-type-icon.payment-type-rebill-init,
.payment-type-icon.payment-type-rebill-auto-payment { background-image: url('../../img/icon-payment-type-recurring.svg'); }
.payment-type-icon.payment-type-correction     { background-image: url('../../img/icon-payment-type-correction.svg'); }

.subscription-details { margin-bottom: 8px; }

.subscription-payment-details {
    display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
    font-size: 0.9em; color: #666; margin-top: 4px;
}
.subscription-payment-details .amount { color: #474747; }

.donation-gateway-pm { display: flex; align-items: center; gap: 4px; font-size: 12px;font-weight:500; color: #626262; margin-top: 4px; }
.donation-gateway-pm img { width: 14px; height: 14px; opacity: 0.5; }

.subscription-status { display: flex; align-items: center; gap: 10px; font-size: 0.85em; }
.subscription-status .status { color: #758b14; }
.item.subscription-canceled .status { color: #aaa; }

.item .date { font-size: 0.8em; color: #aaa; }
.item p { margin: 6px 0 0; font-size:14px; }

.donations-history-empty { font-size: 14px;color: #5d5d5d;font-weight: 400; margin-top:10px;}


/* ===========================
   ACCOUNT — CANCEL SUBSCRIPTION
   =========================== */

.leyka-cancel-subscription-form h3,
.leyka-confirm-unsubscribe-request-form h3,
.leyka-confirm-go-resubscribe-form h3 { margin-top: 0; }

.cancel-reasons { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }

.donor__checkbox { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; font-size: 0.95em; }
.donor__checkbox input[type="checkbox"] { display: none; }
.checkbox-label { line-height: 1.4; }

.unsubscribe-comment { margin: 12px 0; }
.unsubscribe-comment textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ededed;
    border-radius: 6px;
    font-size: 0.95em;
    resize: vertical;
    outline: none;
}
.unsubscribe-comment textarea:focus { border-color: var(--leyka-accent, #43a047); }

.form-message { font-size: 0.9em; padding: 8px 0; }
.form-ajax-indicator { margin: 8px 0; text-align: center; }
.leyka-back-to-account { padding: 16px 0; }


/* ===========================
   ACCOUNT — BUTTONS & LINKS
   =========================== */

.leyka-star-submit { display: flex; align-items: center; gap:8px; flex-wrap: wrap; margin-top: 10px; }

.leyka-star-submit-button {
    background: #ddd!important;
}

.leyka-star-single-link { font-size: 13px; background:#fff;border: 1px solid #d8dee8;font-weight:500;padding: 10px 20px;border-radius:100px; }

.leyka-do-not-unsubscribe { font-weight:500;font-size:14px;background:#9FB92A;border:none;}
.action-disconnect { color: #4572a3 !important;background:transparent;border:none;padding:3px; }
.donations-history-more { display: block; margin-top: 8px; }
.leyka-cancel-subscription-form h3{font-weight:500!important;font-size:15px!important;}


/* ===========================
   SCALE SHORTCODE
   =========================== */

.leyka-scale-compact,
.leyka-scale-ultra,
.leyka-scale-ultra-fake { display: flex; flex-direction: column; gap: 6px; }

.leyka-scale-scale .target {
    height: 8px;
    background: #ededed;
    border-radius: 4px;
    overflow: hidden;
}
.leyka-scale-scale .collected {
    height: 100%;
    background: var(--leyka-accent, #43a047);
    border-radius: 4px;
    transition: width 0.4s ease;
}

.leyka-scale-label { font-size: 0.85em; color: #666; }
.leyka-scale-label b { font-weight: 700; color: #474747; }

.leyka-scale-button { margin-top: 12px; }
.leyka-scale-button a {
    display: inline-block;
    padding: 10px 24px;
    background: var(--leyka-accent, #43a047);
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.15s;
}
.leyka-scale-button a:hover { background: var(--leyka-accent-dark, #388e3c); }


/* ===========================
   DONORS LIST SHORTCODE
   =========================== */

.leyka-donors-list { display: flex; flex-direction: column; }
.leyka-donors-list__title { font-size: 1em;}

.ldl-item { display: flex; align-items: baseline; gap: 16px; padding: 8px 0; border-bottom: 1px solid #dddddd; font-size:15px;font-weight:500;margin-bottom:14px; }
.ldl-type-icon { flex-shrink: 0; display: flex; align-items: center; }
.ldl-type-icon img { width: 18px; height: 18px; display: block; }
.ldl-date { color: #aaa; white-space: nowrap; flex-shrink: 0; }
.ldl-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #555; }
.ldl-amount { font-weight: 700; color: #7b9117; white-space: nowrap; flex-shrink: 0; }
.ldl-amount-total { color: #aaa; font-weight: normal; }
.ldl-purpose { font-size: 0.85em; color: #666; margin-top: 2px; width: 100%; }
.ldl-purpose a { color: var(--leyka-accent, #43a047); text-decoration: none; }


/* ===========================
   INLINE PAYMENT RESULT MESSAGES
   =========================== */

.leyka-payment-result {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    margin: 0;
}

.leyka-payment-result__icon {
    font-size: 1.3em;
    flex-shrink: 0;
}

.leyka-payment-success {
    background: #EEF2DE;
    border: 1px solid #d1dda3;
    color: #708513;
}

.leyka-payment-fail {
    background: #fdf3f3;
    border: 1px solid #f0b8b8;
    color: #8b2424;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.leyka-payment-fail a {
    color: #8b2424;
}

@media (max-width: 767px) {
.leyka-payment-form{padding:24px 16px;}}

/* Finance report shortcode */
.leyka-finance-report { font-family: inherit; }
.leyka-finance-report__title { font-size: 30px!important; margin-bottom:30px;text-align:center; }
.leyka-finance-report__years { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 32px; }
@media (max-width: 600px) { .leyka-finance-report__years { grid-template-columns: 1fr; } }

.leyka-finance-report__year-heading { font-size: 20px; font-weight: 700; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 2px solid #e0e0e0; }
.leyka-finance-report__month-btn { display: flex; align-items: center; width: 100%; background:var(--leyka-accent, #43a047) !important; text-align: left; gap: 10px;margin-bottom:4px;opacity:0.8; }
.leyka-finance-report__month-btn::before { content: '+'; display: inline-block; width: 18px; font-size: 18px; flex-shrink: 0; transition: color .15s; }

.leyka-finance-report__month-btn.is-open::before { content: '−';  }

.leyka-finance-report__month-content { padding:16px; font-size:15px;font-weight:400;background-color:#f9f9f9;border-radius:16px;margin:6px 0 10px 0;border:1px solid #d9d9d9;line-height:1.5em;}
.lfr-pending { font-style: italic; }