/* ==========================================================================
   Jaap counter (web.modules.jaap_counter + jaap-counter.js) - the one जाप
   used by /sadhna and /manokamna. The other साधना tool screens reuse its
   header / done / today classes, so /sadhna loads this file too.
   ========================================================================== */
/* Jaap counter - full screen inside the app column */
.sd-jaap {
    position: fixed;
    inset: 0;
    z-index: 1450;
    background: rgba(33, 20, 12, 0.5);
}

.sd-jaap[hidden] {
    display: none;
}

.sd-jaap-lock,
.sd-jaap-lock body {
    overflow: hidden;
}

.sd-jaap-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: var(--sb-app-width);
    height: 100%;
    margin: 0 auto;
    padding: 12px 16px calc(18px + env(safe-area-inset-bottom));
    overflow-y: auto;
    background:
        radial-gradient(circle at 50% 38%, rgba(255, 214, 150, 0.35), transparent 45%),
        linear-gradient(180deg, #fffaf3, #fbeedd);
    color: #3a2216;
}

.sd-jaap-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.sd-jaap-top b {
    font-size: 16px;
}

.sd-jaap-icon {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid #ead8c4;
    border-radius: 14px;
    background: #fff;
    color: #6b4a35;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.sd-jaap-mantras {
    display: flex;
    gap: 8px;
    width: calc(100% + 32px);
    margin: 14px -16px 0;
    padding: 0 16px 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

.sd-jaap-mantras::-webkit-scrollbar {
    display: none;
}

.sd-jaap-mantra {
    flex: 0 0 auto;
    max-width: 190px;
    padding: 9px 12px;
    border: 1px solid #ead8c4;
    border-radius: 14px;
    background: #fff;
    color: #3a2216;
    text-align: left;
    cursor: pointer;
}

.sd-jaap-mantra b {
    display: block;
    overflow: hidden;
    font-size: 12.5px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.sd-jaap-mantra small {
    display: block;
    margin-top: 1px;
    color: #8a6d57;
    font-size: 10.5px;
}

.sd-jaap-mantra[aria-checked="true"] {
    border-color: #3a2216;
    background: #3a2216;
    color: #fff;
}

.sd-jaap-mantra[aria-checked="true"] small {
    color: #e6d3c1;
}

.sd-jaap-text {
    margin: 22px 0 14px;
    color: #6d351c;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.4;
    text-align: center;
}

/* The ring: conic fill shows progress; the whole disc is the tap target. */
.sd-jaap-ring {
    position: relative;
    display: grid;
    flex: 0 0 auto;
    width: min(240px, 68vw);
    aspect-ratio: 1;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f1e2cf;
    box-shadow: 0 18px 40px rgba(110, 48, 15, 0.18);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.08s ease;
}

.sd-jaap-ring:active {
    transform: scale(0.97);
}

.sd-jaap-ring-fill {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(#a44d17 var(--sd-progress, 0%), transparent 0);
}

.sd-jaap-ring-inner {
    position: absolute;
    inset: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 35%, #fffdf8, #fff4e4);
}

.sd-jaap-ring-inner b {
    color: #3a2216;
    font-size: 56px;
    line-height: 1;
}

.sd-jaap-ring-inner small {
    margin-top: 4px;
    color: #8a6d57;
    font-size: 14px;
    font-weight: 700;
}

.sd-jaap-ring-inner em {
    margin-top: 10px;
    color: #b08667;
    font-size: 11px;
    font-style: normal;
}

.sd-jaap-done {
    margin: 14px 0 0;
    color: #2f6f52;
    font-size: 16px;
    font-weight: 800;
}

.sd-jaap-done[hidden] {
    display: none;
}

.sd-jaap-targets {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    margin-top: 18px;
}

.sd-jaap-target {
    padding: 10px 0;
    border: 1px solid #ead8c4;
    border-radius: 13px;
    background: #fff;
    color: #6b4a35;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.sd-jaap-target[aria-checked="true"] {
    border-color: #a44d17;
    background: #a44d17;
    color: #fff;
}

.sd-jaap-today {
    margin: 14px 0 0;
    color: #8a6d57;
    font-size: 12px;
    text-align: center;
}
.sd-jaap-top-right { display: inline-flex; gap: 6px; }
/* The hidden attribute always wins inside the counter (chooser in fixed mode, done line). */
.sd-jaap [hidden] { display: none !important; }
