/*
 * Bağış sayfası.
 *
 * Tema değişkenlerini (--tp-theme-*) kullanır; kurumsal renk panelden
 * değişirse buradaki hiçbir şey elle güncellenmez.
 */

.bagis {
    --bagis-radius: 14px;
    --bagis-line: #e3ebeb;
}

/* ---------- Kampanya künyesi ---------- */

.bagis-hero {
    background: var(--tp-grey-1);
    border-radius: var(--bagis-radius);
    padding: 32px;
    margin-bottom: 30px;
}

.bagis-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--tp-theme-2);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 40px;
    margin-bottom: 14px;
}

.bagis-hero__title {
    color: var(--tp-heading-primary);
    font-size: 30px;
    line-height: 1.25;
    margin-bottom: 10px;
}

.bagis-hero__summary {
    color: var(--tp-text-body);
    margin-bottom: 0;
}

/* ---------- Hedef çubuğu ---------- */

.bagis-progress {
    margin-top: 24px;
}

.bagis-progress__numbers {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.bagis-progress__collected {
    font-size: 26px;
    font-weight: 700;
    color: var(--tp-theme-2);
    line-height: 1;
}

.bagis-progress__goal {
    color: var(--tp-text-body);
    font-size: 14px;
}

.bagis-progress__bar {
    height: 12px;
    border-radius: 40px;
    background: #fff;
    border: 1px solid var(--bagis-line);
    overflow: hidden;
}

.bagis-progress__fill {
    height: 100%;
    border-radius: 40px;
    background: linear-gradient(90deg, var(--tp-theme-2), var(--tp-theme-3));
    transition: width .6s ease;
}

.bagis-progress__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 12px;
    font-size: 14px;
    color: var(--tp-text-body);
}

.bagis-progress__meta i {
    color: var(--tp-theme-2);
    margin-right: 5px;
}

/* ---------- Yöntem sekmeleri ---------- */

.bagis-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 26px;
}

.bagis-method {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    background: #fff;
    border: 1.5px solid var(--bagis-line);
    border-radius: var(--bagis-radius);
    padding: 16px;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}

.bagis-method:hover {
    border-color: var(--tp-theme-3);
}

.bagis-method.is-active {
    border-color: var(--tp-theme-2);
    box-shadow: 0 0 0 3px rgba(7, 132, 127, .12);
}

.bagis-method__icon {
    flex: 0 0 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--tp-grey-1);
    color: var(--tp-theme-2);
    font-size: 18px;
}

.bagis-method.is-active .bagis-method__icon {
    background: var(--tp-theme-2);
    color: #fff;
}

.bagis-method__title {
    display: block;
    font-weight: 600;
    color: var(--tp-heading-primary);
    line-height: 1.2;
}

.bagis-method__hint {
    display: block;
    font-size: 13px;
    color: var(--tp-text-body);
}

/* ---------- "Yakında" penceresi ---------- */

/*
 * Sanal POS açılana kadar kart yolunda gönderim bu pencerede durur.
 * Bootstrap'in modal bileşenine bağlı değil; bağış sayfası tek bir
 * eklenti yüklenmese de çalışsın diye kendi kuralları var.
 */
.bagis-modal {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.bagis-modal[hidden] {
    display: none;
}

body.bagis-modal-open {
    overflow: hidden;
}

.bagis-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 24, 32, .55);
    animation: bagis-modal-fade .18s ease-out;
}

.bagis-modal__box {
    position: relative;
    width: 100%;
    max-width: 460px;
    background: #fff;
    border-radius: var(--bagis-radius);
    padding: 34px 30px 28px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(16, 24, 32, .22);
    animation: bagis-modal-rise .22s ease-out;
}

.bagis-modal__box:focus {
    outline: none;
}

.bagis-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--tp-text-body);
    font-size: 16px;
    cursor: pointer;
    transition: background .2s;
}

.bagis-modal__close:hover {
    background: var(--tp-grey-1, #f6f7f9);
}

.bagis-modal__icon {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: rgba(7, 132, 127, .1);
    color: var(--tp-theme-2);
    font-size: 26px;
}

.bagis-modal__title {
    font-size: 21px;
    margin: 0 0 10px;
    color: var(--tp-heading-primary);
}

.bagis-modal__text {
    margin: 0;
    color: var(--tp-text-body);
    font-size: 14.5px;
}

.bagis-modal__actions {
    margin-top: 24px;
    display: grid;
    gap: 10px;
    justify-items: center;
}

.bagis-modal__actions .tp-btn {
    width: 100%;
}

.bagis-modal__dismiss {
    border: 0;
    background: transparent;
    color: var(--tp-text-body);
    font-size: 14px;
    text-decoration: underline;
    cursor: pointer;
}

@keyframes bagis-modal-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bagis-modal-rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .bagis-modal__backdrop,
    .bagis-modal__box {
        animation: none;
    }
}
/* ---------- Form kutusu ---------- */

.bagis-panel {
    background: #fff;
    border: 1px solid var(--bagis-line);
    border-radius: var(--bagis-radius);
    padding: 28px;
}

.bagis-panel__title {
    font-size: 18px;
    color: var(--tp-heading-primary);
    margin-bottom: 6px;
}

.bagis-panel__note {
    color: var(--tp-text-body);
    font-size: 14px;
}

.bagis-section {
    margin-bottom: 26px;
}

.bagis-section__label {
    display: block;
    font-weight: 600;
    color: var(--tp-heading-primary);
    margin-bottom: 12px;
}

/* ---------- Tutar seçimi ---------- */

.bagis-amounts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.bagis-amount {
    background: #fff;
    border: 1.5px solid var(--bagis-line);
    border-radius: 10px;
    padding: 14px 12px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}

.bagis-amount:hover {
    border-color: var(--tp-theme-3);
}

.bagis-amount.is-active {
    border-color: var(--tp-theme-2);
    background: rgba(7, 132, 127, .06);
}

.bagis-amount__value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--tp-heading-primary);
    line-height: 1.2;
}

.bagis-amount__impact {
    display: block;
    font-size: 12.5px;
    color: var(--tp-text-body);
    margin-top: 4px;
}

.bagis-custom {
    margin-top: 12px;
    position: relative;
}

.bagis-custom input {
    width: 100%;
    height: 56px;
    border: 1.5px solid var(--bagis-line);
    border-radius: 10px;
    padding: 0 46px 0 16px;
    font-size: 18px;
    font-weight: 600;
    color: var(--tp-heading-primary);
    outline: none;
}

.bagis-custom input:focus {
    border-color: var(--tp-theme-2);
}

.bagis-custom__suffix {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    font-weight: 600;
    color: var(--tp-text-body);
}

/* ---------- Girdiler ---------- */

.bagis-field {
    margin-bottom: 16px;
}

.bagis-field label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--tp-heading-primary);
    margin-bottom: 6px;
}

.bagis-field input,
.bagis-field select,
.bagis-field textarea {
    width: 100%;
    border: 1.5px solid var(--bagis-line);
    border-radius: 10px;
    padding: 12px 14px;
    color: var(--tp-heading-primary);
    outline: none;
    background: #fff;
}

.bagis-field input:focus,
.bagis-field select:focus,
.bagis-field textarea:focus {
    border-color: var(--tp-theme-2);
}

.bagis-field .bagis-help {
    display: block;
    font-size: 12.5px;
    color: var(--tp-text-body);
    margin-top: 5px;
}

.bagis-check {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 14px;
    color: var(--tp-text-body);
    margin-bottom: 10px;
}

.bagis-check input {
    margin-top: 3px;
    flex: 0 0 auto;
}

/* ---------- Banka hesapları ---------- */

.bagis-bank {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border: 1.5px solid var(--bagis-line);
    border-radius: var(--bagis-radius);
    padding: 16px;
    margin-bottom: 12px;
    background: #fff;
}

.bagis-bank.is-active {
    border-color: var(--tp-theme-2);
}

.bagis-bank__qr {
    flex: 0 0 96px;
}

.bagis-bank__qr img {
    width: 96px;
    height: 96px;
    border: 1px solid var(--bagis-line);
    border-radius: 8px;
    background: #fff;
}

.bagis-bank__name {
    font-weight: 600;
    color: var(--tp-heading-primary);
}

.bagis-bank__holder {
    font-size: 13.5px;
    color: var(--tp-text-body);
}

.bagis-bank__iban {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 15px;
    letter-spacing: .02em;
    color: var(--tp-heading-primary);
    margin-top: 6px;
    word-break: break-all;
}

.bagis-copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    border: 1px solid var(--tp-theme-2);
    background: transparent;
    color: var(--tp-theme-2);
    border-radius: 40px;
    font-size: 13px;
    font-weight: 600;
    padding: 5px 14px;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.bagis-copy:hover,
.bagis-copy.is-done {
    background: var(--tp-theme-2);
    color: #fff;
}

/* ---------- SMS ---------- */

.bagis-sms {
    background: var(--tp-theme-1);
    color: #fff;
    border-radius: var(--bagis-radius);
    padding: 30px;
    text-align: center;
}

.bagis-sms__slogan {
    font-size: 20px;
    font-weight: 600;
    color: var(--tp-theme-3);
    margin-bottom: 18px;
}

.bagis-sms__code {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 255, 255, .08);
    border: 1px dashed var(--tp-theme-3);
    border-radius: 10px;
    padding: 16px 22px;
    font-size: 19px;
    margin-bottom: 18px;
}

.bagis-sms__keyword,
.bagis-sms__number {
    font-weight: 700;
    letter-spacing: .06em;
    color: #fff;
}

.bagis-sms__amount {
    display: block;
    font-size: 14px;
    color: rgba(255, 255, 255, .75);
    margin-bottom: 18px;
}

.bagis-sms__note {
    font-size: 13.5px;
    color: rgba(255, 255, 255, .7);
    margin: 16px auto 0;
    max-width: 520px;
}

/* ---------- Bağışçı duvarı ---------- */

.bagis-wall {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 12px;
}

.bagis-wall__item {
    background: var(--tp-grey-1);
    border-radius: 10px;
    padding: 14px 16px;
}

.bagis-wall__name {
    font-weight: 600;
    color: var(--tp-heading-primary);
}

.bagis-wall__amount {
    color: var(--tp-theme-2);
    font-weight: 700;
    font-size: 14px;
}

.bagis-wall__message {
    font-size: 13.5px;
    color: var(--tp-text-body);
    margin-top: 6px;
    font-style: italic;
}

/* ---------- Sonuç ekranı ---------- */

.bagis-result {
    text-align: center;
    background: #fff;
    border: 1px solid var(--bagis-line);
    border-radius: var(--bagis-radius);
    padding: 40px 30px;
}

.bagis-result__icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 34px;
}

.bagis-result__icon--ok {
    background: rgba(7, 132, 127, .12);
    color: var(--tp-theme-2);
}

.bagis-result__icon--wait {
    background: rgba(254, 127, 76, .14);
    color: var(--tp-common-orange);
}

.bagis-result__icon--fail {
    background: rgba(220, 53, 69, .12);
    color: #dc3545;
}

.bagis-result__amount {
    font-size: 32px;
    font-weight: 700;
    color: var(--tp-heading-primary);
    margin: 6px 0 4px;
}

.bagis-ref {
    display: inline-block;
    background: var(--tp-grey-1);
    border: 1px dashed var(--tp-theme-2);
    border-radius: 10px;
    padding: 10px 18px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--tp-heading-primary);
}

/* ---------- Diğer kampanyalar ---------- */

.bagis-card {
    display: block;
    background: #fff;
    border: 1px solid var(--bagis-line);
    border-radius: var(--bagis-radius);
    overflow: hidden;
    height: 100%;
    transition: box-shadow .2s, transform .2s;
}

.bagis-card:hover {
    box-shadow: 0 12px 28px rgba(30, 55, 55, .1);
    transform: translateY(-3px);
}

.bagis-card__cover {
    height: 160px;
    background: var(--tp-grey-1) center/cover no-repeat;
}

.bagis-card__body {
    padding: 18px;
}

.bagis-card__title {
    font-size: 17px;
    color: var(--tp-heading-primary);
    margin-bottom: 6px;
}

.bagis-card__summary {
    font-size: 14px;
    color: var(--tp-text-body);
    margin-bottom: 12px;
}

@media (max-width: 575px) {
    .bagis-hero,
    .bagis-panel {
        padding: 20px;
    }

    .bagis-hero__title {
        font-size: 24px;
    }
}

/* ---------- Bağış sıklığı ---------- */

.bagis-frequency {
    display: inline-flex;
    background: var(--tp-grey-1);
    border-radius: 40px;
    padding: 4px;
    gap: 4px;
    margin-bottom: 16px;
}

.bagis-frequency__option {
    border: 0;
    background: transparent;
    border-radius: 40px;
    padding: 9px 20px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--tp-text-body);
    cursor: pointer;
    transition: background .2s, color .2s;
}

.bagis-frequency__option:hover {
    color: var(--tp-heading-primary);
}

.bagis-frequency__option.is-active {
    background: var(--tp-theme-2);
    color: #fff;
}

.bagis-frequency__note {
    display: block;
    font-size: 13.5px;
    color: var(--tp-text-body);
    margin: -6px 0 16px;
}

.bagis-frequency__note strong {
    color: var(--tp-theme-2);
}

/* ---------- Talimat yönetim sayfası ---------- */

.bagis-sub {
    background: #fff;
    border: 1px solid var(--bagis-line);
    border-radius: var(--bagis-radius);
    padding: 28px;
}

.bagis-sub__status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 40px;
    padding: 5px 14px;
    font-size: 13px;
    font-weight: 600;
}

.bagis-sub__status--active { background: rgba(7, 132, 127, .12); color: var(--tp-theme-2); }
.bagis-sub__status--paused { background: rgba(254, 127, 76, .14); color: #d2622f; }
.bagis-sub__status--cancelled { background: #eef1f1; color: var(--tp-text-body); }
.bagis-sub__status--failed { background: rgba(220, 53, 69, .12); color: #dc3545; }

.bagis-sub__amount {
    font-size: 34px;
    font-weight: 700;
    color: var(--tp-heading-primary);
    line-height: 1.1;
    margin: 14px 0 4px;
}

.bagis-sub__facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin: 24px 0;
    padding: 20px 0;
    border-top: 1px solid var(--bagis-line);
    border-bottom: 1px solid var(--bagis-line);
}

.bagis-sub__fact-label {
    display: block;
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--tp-grey-2);
    margin-bottom: 3px;
}

.bagis-sub__fact-value {
    font-weight: 600;
    color: var(--tp-heading-primary);
}

.bagis-history {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.bagis-history th {
    text-align: left;
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--tp-grey-2);
    font-weight: 600;
    padding: 0 0 8px;
    border-bottom: 1px solid var(--bagis-line);
}

.bagis-history td {
    padding: 10px 0;
    border-bottom: 1px solid var(--bagis-line);
    color: var(--tp-heading-primary);
}

.bagis-history tr:last-child td { border-bottom: 0; }
