/* ═══════════════════════════════════════════
   Prayer Counter — Stylesheet
   File: prayer-counter.css
═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;1,400&family=Source+Sans+3:wght@400;600&display=swap');

/* ── Wrapper ── */
.pc-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 28px 20px;
    font-family: 'Source Sans 3', sans-serif;
}

/* ── Button base ── */
.pc-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border: 2px solid #8B5E3C;
    border-radius: 50px;
    background: transparent;
    color: #8B5E3C;
    font-family: 'Lora', serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition:
        background 0.3s ease,
        color 0.3s ease,
        transform 0.15s ease,
        box-shadow 0.3s ease;
}

.pc-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #8B5E3C;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
    border-radius: inherit;
}

.pc-btn:hover:not(:disabled)::before {
    transform: scaleX(1);
}

.pc-btn:hover:not(:disabled) {
    color: #fff;
    box-shadow: 0 6px 24px rgba(139, 94, 60, 0.35);
    transform: translateY(-2px);
}

.pc-btn:active:not(:disabled) {
    transform: translateY(0px);
    box-shadow: 0 2px 8px rgba(139, 94, 60, 0.25);
}

.pc-btn__icon,
.pc-btn__text {
    position: relative;
    z-index: 1;
}

.pc-btn__icon {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.pc-btn:hover:not(:disabled) .pc-btn__icon {
    transform: scale(1.2) rotate(-5deg);
}

/* ── Done / already prayed state ── */
.pc-btn--done {
    background: #f3ede8;
    border-color: #c9a882;
    color: #7a6248;
    cursor: default;
    opacity: 0.85;
}

.pc-btn--done::before {
    display: none;
}

/* ── Pulse animation on success ── */
@keyframes pc-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(139, 94, 60, 0.5); }
    70%  { box-shadow: 0 0 0 14px rgba(139, 94, 60, 0); }
    100% { box-shadow: 0 0 0 0   rgba(139, 94, 60, 0); }
}

.pc-btn--pulse {
    animation: pc-pulse 0.7s ease-out;
}

/* ── Count display ── */
.pc-count {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin: 0;
    text-align: center;
}

.pc-count__today {
    font-family: 'Lora', serif;
    font-size: 0.95rem;
    color: #5c4a36;
    font-style: italic;
    transition: opacity 0.4s ease;
}

.pc-count__total {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.78rem;
    color: #a0876e;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ── Count bump animation ── */
@keyframes pc-count-bump {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.2); color: #8B5E3C; font-weight: 700; }
    100% { transform: scale(1); }
}

.pc-count__today--bump {
    animation: pc-count-bump 0.5s ease-out forwards;
}

/* ── Loading spinner (shown during AJAX) ── */
.pc-btn--loading .pc-btn__icon {
    animation: pc-spin 0.8s linear infinite;
}

@keyframes pc-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .pc-btn {
        font-size: 0.9rem;
        padding: 12px 22px;
    }
}
