/* ══════════════════════════════
   INFAQ WIDGET — style-infaq.css
══════════════════════════════ */

.infaq-wrapper {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* ── Card ── */
.infaq-card {
    background: #147574;
    border-radius: 1rem;
    padding: 1.25rem;
    color: white;
}

.infaq-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin: 0;
}

.infaq-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin: 0;
}

.infaq-subtitle {
    text-align: center;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 1.25rem 0;
    line-height: 1.3;
}

.infaq-subtitle span {
    color: #ffcc00;
    font-weight: 700;
}

/* ── Form ── */
#infaq-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#infaq-form.infaq-hidden {
    display: none;
}

.infaq-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.infaq-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
}

.infaq-input {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: white;
    color: black;
    border: none;
    outline: none;
    box-sizing: border-box;
}

.infaq-input:focus {
    box-shadow: 0 0 0 0.125rem rgba(255, 204, 0, 0.6);
}

/* ── Preset Nominal ── */
.infaq-preset-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.infaq-preset-btn {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.infaq-preset-btn:hover,
.infaq-preset-btn.infaq-preset-active {
    background: #ffcc00;
    color: #000;
}

/* ── Submit Button ── */
.infaq-btn-submit {
    width: 100%;
    background: #ffcc00;
    color: #000;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.75rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.infaq-btn-submit:hover:not(:disabled) {
    background: #fde047;
}

.infaq-btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Progress Bar Submit ── */
.infaq-progress-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.infaq-progress-label {
    font-size: 1rem;
    font-weight: 700;
}

.infaq-progress-track {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 9999px;
    overflow: hidden;
}

.infaq-progress-bar {
    height: 100%;
    width: 0%;
    background: #000;
    border-radius: 9999px;
    transition: width 0.1s linear;
}

/* ── Area Bayar ── */
#infaq-area-bayar {
    display: none;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

/* ── QR Code ── */
.infaq-qr-wrap {
    display: flex;
    justify-content: center;
}

#infaq-qrcode {
    background: white;
    border-radius: 1rem;
    padding: 0.5rem;
    box-shadow: 0 0.25rem 0.375rem rgba(0, 0, 0, 0.2);
}

#infaq-qrcode img {
    width: 100%;
    object-fit: contain;
    display: block;
    border-radius: 0.5rem;
}

/* ── QR Loading ── */
.infaq-qr-loading {
    width: 200px;
    height: 200px;
    background: white;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 1.25rem;
    box-sizing: border-box;
}

.infaq-qr-pct {
    font-size: 1.5rem;
    font-weight: 700;
    color: #147574;
    letter-spacing: -0.02em;
}

.infaq-qr-track {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
}

.infaq-qr-bar {
    height: 100%;
    width: 0%;
    background: #147574;
    border-radius: 9999px;
    transition: width 0.1s linear;
}

.infaq-qr-hint {
    font-size: 0.625rem;
    color: #9ca3af;
    text-align: center;
    line-height: 1.4;
}

/* ── Nominal Display ── */
.infaq-nominal-box {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    text-align: center;
}

.infaq-nominal-box p:first-child {
    font-size: .9rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 0.1rem 0;
    line-height:1.2;
}

#infaq-tampil-final {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.025em;
    margin: 0;
}

/* ── Badge ── */
.infaq-badge-wrap {
    display: flex;
    justify-content: center;
}

.infaq-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #dcfce7;
    color: #166534;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: 9999px;
    padding: 0.375rem 1rem;
}

/* ── Status Bayar ── */
#infaq-status-bayar {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    margin: 0;
}

/* ── Cek Progress ── */
.infaq-cek-wrap {
    margin-bottom: 10px;
}

.infaq-cek-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 5px;
}

.infaq-cek-track {
    width: 100%;
    height: 7px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    overflow: hidden;
}

.infaq-cek-bar {
    height: 100%;
    width: 0%;
    background: #ffcc00;
    border-radius: 9999px;
    transition: width 0.1s linear;
}

/* ── Tata Cara ── */
.infaq-tatacara {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 1rem;
}

.infaq-tatacara-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 0.75rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.infaq-tatacara ol {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.infaq-tatacara li {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
}

.infaq-step-num {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 9999px;
    background: #ffcc00;
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.125rem;
}

.infaq-step-text {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
}

/* ── Tombol Batal ── */
.infaq-batal-wrap {
    display: flex;
    justify-content: center;
}

.infaq-btn-batal {
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: transparent;
    font-size: 0.75rem;
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.infaq-btn-batal:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* ── Tombol Cek ── */
.infaq-btn-cek {
    background: #ffcc00;
    color: #000;
    font-size: 0.875rem;
    font-weight: 700;
    padding: 0.5rem 1.75rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}

.infaq-btn-cek:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Divider ── */
.infaq-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* ── Riwayat / Total ── */
.infaq-total-wrap {
    text-align: center;
    margin-bottom: 1rem;
}

.infaq-total-wrap p {
    font-size: .9rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    letter-spacing: 0.05em;
}

#infaq-total-terkumpul {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffcc00;
}

.infaq-tabel-wrapper {
    overflow-x: auto;
    overflow-y: auto;        
    max-height: 300px;       
    border-radius: 0rem;
}

.infaq-tabel {
    width: fit-content;
    font-size: 0.875rem;
    margin:0 auto;
    color: black;
    background: white;
    border-radius: 0rem;
    overflow: hidden;
    border-collapse: collapse;
}

.infaq-tabel thead tr {
    background: #0d5252;
    color: white;
    font-size: 0.75rem;
    position: sticky;   
    top: 0;             
    z-index: 1;     
}

.infaq-tabel th {
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-weight: 600;
}

.infaq-tabel th:last-child,
.infaq-tabel td:last-child {
    text-align: right;
}

.infaq-tabel td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #ccf0ee;
}

.infaq-tabel tbody tr:nth-child(even) {
    background: #f0f9f9;
}

.infaq-tabel tbody tr:nth-child(odd) {
    background: white;
}

/* ── Pesan ── */
#infaq-pesan {
    font-size: 0.875rem;
}

.infaq-msg-warn    { color: #ffcc00; font-weight: 700; }
.infaq-msg-error   { color: #ff9090; font-weight: 600; }
.infaq-msg-success { color: #fff;    font-weight: 600; }

.infaq-empty-msg {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    font-size: 0.875rem;
    padding: 0.5rem 0;
    margin: 0;
}


.infaq-badge-konfirmasi {
    background: #fff8e1;
    border: 1px solid #f9a825;
    border-left: 4px solid #f9a825;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: #5d4037;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.infaq-kendala {
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin: -.5rem 0 -.3rem 0;
    line-height: 1.3;
}
