/* Zakat al-Fitr, fidya/kaffarah calculators and "Nisab today" pages.
   The guide-* / btn-cta rules mirror templates/guide.html so these pages
   read like the guides. */

.guide-hero {
    text-align: center;
    margin-bottom: 25px;
}
.guide-hero .subtitle {
    margin-bottom: 16px;
}
.btn-cta {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 999px;
    background: #667eea;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(102, 126, 234, 0.35);
}
.guide-section {
    margin-bottom: 26px;
}
.guide-section h2,
.guide-section h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.1rem;
}
.guide-section p {
    color: #4a5568;
    margin-bottom: 10px;
}
.guide-callout {
    background: #f0f5ff;
    border-left: 4px solid #667eea;
    padding: 14px 16px;
    border-radius: 0 8px 8px 0;
}
.guide-callout ul,
.guide-section ul,
.guide-section ol {
    margin-left: 20px;
    color: #4a5568;
}
.guide-section li {
    margin-bottom: 6px;
}
.guide-cta-block {
    background: #fefcbf;
    border-left: 4px solid #d69e2e;
    padding: 14px 16px;
    border-radius: 0 8px 8px 0;
    color: #744210;
    font-weight: 600;
}
.guide-faq {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 16px;
    margin-bottom: 16px;
}
.guide-faq:last-child {
    border-bottom: none;
    margin-bottom: 0;
}
.guide-faq h3 {
    color: #667eea;
    font-size: 1rem;
    margin-bottom: 6px;
}
.guide-related {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.related-card {
    display: block;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    background: #f8fafc;
}
.related-card:hover {
    border-color: #cbd5f5;
}
.related-card h4 {
    color: #2d3748;
    font-size: 0.98rem;
    margin-bottom: 6px;
}
.related-card p {
    color: #718096;
    font-size: 0.9rem;
}
.guide-resources {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #e2e8f0;
    color: #4a5568;
}
.guide-resources a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}


.tool-hero {
    text-align: center;
    margin-bottom: 22px;
}

.tool-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 28px;
}

.tool-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px 18px;
}

.tool-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 600;
    color: #2d3748;
    font-size: 0.95rem;
}

.tool-field[hidden] {
    display: none;
}

.tool-field input,
.tool-field select {
    font: inherit;
    font-weight: 400;
    padding: 9px 11px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    background: #fff;
    min-width: 0;
}

.tool-field input:focus-visible,
.tool-field select:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 1px;
}

.tool-hint {
    font-weight: 400;
    font-size: 0.85rem;
    color: #718096;
}

.tool-choice {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
    border: 0;
    padding: 0;
}

.tool-choice legend {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.tool-choice label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    flex: 1 1 240px;
    color: #4a5568;
    font-size: 0.92rem;
}

.tool-choice label strong {
    display: block;
    color: #2d3748;
}

.tool-choice input {
    margin-top: 3px;
}

.tool-choice label:has(input:checked) {
    border-color: #667eea;
    background: #f0f5ff;
}

.tool-result {
    display: block;
    margin-top: 18px;
    padding: 16px;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-align: center;
}

.tool-result-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
}

.tool-result-total {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 4px 0;
    overflow-wrap: anywhere;
}

.tool-result-breakdown {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
}

.tool-deadline {
    margin-top: 12px;
    font-weight: 600;
    color: #744210;
    background: #fefcbf;
    border-left: 4px solid #d69e2e;
    padding: 10px 14px;
    border-radius: 0 8px 8px 0;
}

.tool-source {
    margin-top: 12px;
    font-size: 0.85rem;
    color: #718096;
}

.tool-source a,
.tool-table a {
    color: #667eea;
}

.tool-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.btn-secondary {
    display: inline-block;
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid #667eea;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    background: #fff;
}

.btn-secondary:hover {
    background: #f0f5ff;
}

.tool-table-wrap {
    overflow-x: auto;
    margin: 10px 0;
}

.tool-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.tool-table th,
.tool-table td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
}

.tool-table th {
    color: #2d3748;
    background: #f8fafc;
}

.tool-table td.num,
.tool-table th.num {
    text-align: right;
    white-space: nowrap;
}

/* Nisab today */
.nisab-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.nisab-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    background: #fff;
}

.nisab-card h2 {
    font-size: 1rem;
    color: #4a5568;
    margin-bottom: 6px;
}

.nisab-card .nisab-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2d3748;
    overflow-wrap: anywhere;
}

.nisab-card .nisab-detail {
    font-size: 0.88rem;
    color: #718096;
}

.nisab-card.is-gold {
    border-top: 4px solid #d69e2e;
}

.nisab-card.is-silver {
    border-top: 4px solid #a0aec0;
}

.currency-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
}

.currency-links a {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 999px;
    text-decoration: none;
    color: #4a5568;
    font-size: 0.9rem;
}

.currency-links a:hover,
.currency-links a[aria-current="page"] {
    border-color: #667eea;
    color: #667eea;
    background: #f0f5ff;
}

.change-up {
    color: #2f855a;
}

.change-down {
    color: #c53030;
}

@media (max-width: 600px) {
    /* Codes are enough on phones; keeps both nisab columns on screen */
    .nisab-index-table .tool-hint {
        display: none;
    }

    .tool-table th,
    .tool-table td {
        padding: 7px 6px;
    }

    .tool-table th.num {
        white-space: normal;
    }

    .tool-card {
        padding: 14px;
    }

    .tool-result-total {
        font-size: 1.6rem;
    }
}
