/* ==========================================================================
   Taranagar Essentials - Interactive Calculators & Tools Stylesheet
   Package: Taranagar Essentials
   ========================================================================== */

.interactive-tool-box {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin: 20px 0 40px;
    overflow: hidden;
}

[data-theme="dark"] .interactive-tool-box {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.tool-card-header {
    background: #0056b3;
    color: #ffffff;
    padding: 16px 24px;
}

.tool-card-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
}

.tool-card-body {
    padding: 24px;
}

/* Form Inputs Grid */
.calc-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.calc-input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #1e293b;
}

[data-theme="dark"] .calc-input-group label {
    color: #f1f5f9;
}

.calc-field-input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    background: #f8fafc;
    color: #0f172a;
    transition: all 0.2s ease;
}

[data-theme="dark"] .calc-field-input {
    background: #0f172a;
    border-color: #334155;
    color: #f8fafc;
}

.calc-field-input:focus {
    border-color: #0056b3;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.15);
}

/* Rate Selector Pills */
.gst-rate-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rate-pill {
    padding: 8px 14px;
    border: 1px solid #cbd5e1;
    background: #f1f5f9;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #334155;
}

.rate-pill:hover,
.rate-pill.active {
    background: #0056b3;
    color: #ffffff;
    border-color: #0056b3;
}

.rate-custom-input {
    width: 90px;
    padding: 6px 10px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    text-align: center;
    font-weight: 700;
}

/* Radio Toggles */
.calc-radio-toggle,
.font-conv-controls {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
    padding: 8px 0;
}

.radio-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Results Display Panel */
.calc-results-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
}

[data-theme="dark"] .calc-results-panel {
    background: #0f172a;
    border-color: #334155;
}

.result-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed #cbd5e1;
    font-size: 1rem;
}

[data-theme="dark"] .result-stat-row {
    border-color: #334155;
}

.total-tax-row {
    color: #059669;
    font-weight: 700;
}

.grand-total-row {
    border-bottom: none;
    padding-top: 14px;
    font-size: 1.25rem;
}

.highlight-val {
    font-size: 1.5rem;
    font-weight: 900;
    color: #2563eb;
}

/* Button Actions */
.btn-tool-action {
    background: #0056b3;
    color: #ffffff;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-tool-action:hover {
    background: #004494;
    transform: translateY(-1px);
}

/* Age Result Card */
.age-result-card {
    background: #f0fdf4;
    border: 2px solid #86efac;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

[data-theme="dark"] .age-result-card {
    background: #064e3b;
    border-color: #059669;
}

.age-main-text {
    font-size: 1.8rem;
    font-weight: 900;
    color: #15803d;
    display: block;
    margin-bottom: 16px;
}

[data-theme="dark"] .age-main-text {
    color: #6ee7b7;
}

.age-substats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #bbf7d0;
}

.age-stat-item {
    background: #ffffff;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #dcfce7;
}

[data-theme="dark"] .age-stat-item {
    background: #022c22;
    border-color: #047857;
    color: #f1f5f9;
}

/* Percentage Inline Forms */
.calc-form-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.inline-input {
    width: 120px;
}

.inline-result {
    font-size: 1.25rem;
    font-weight: 800;
    color: #2563eb;
    margin-left: 10px;
}

.calc-divider {
    border: 0;
    border-top: 1px solid #e2e8f0;
    margin: 20px 0;
}

/* Land Results Grid */
.land-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.land-unit-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}

[data-theme="dark"] .land-unit-card {
    background: #0f172a;
    border-color: #334155;
}

.land-unit-card.highlight-card {
    background: #eff6ff;
    border: 2px solid #3b82f6;
}

[data-theme="dark"] .land-unit-card.highlight-card {
    background: #1e3a8a;
    border-color: #60a5fa;
}

.unit-card-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 6px;
}

.unit-card-val {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    display: block;
}

[data-theme="dark"] .unit-card-val {
    color: #f8fafc;
}

.unit-card-sub {
    font-size: 0.85rem;
    color: #2563eb;
    font-weight: 700;
}

/* Bill Generator Styles */
.bill-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-print-green {
    background: #10b981;
}

.btn-print-green:hover {
    background: #059669;
}

.bill-header-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid #cbd5e1;
}

.bill-editable-title {
    width: 100%;
    font-size: 1.35rem;
    font-weight: 800;
    border: none;
    border-bottom: 2px dashed #94a3b8;
    background: transparent;
    color: #0f172a;
    margin-bottom: 8px;
}

.bill-editable-sub {
    width: 100%;
    font-size: 0.95rem;
    border: none;
    border-bottom: 1px dashed #cbd5e1;
    background: transparent;
    color: #475569;
    margin-bottom: 6px;
}

[data-theme="dark"] .bill-editable-title {
    color: #f8fafc;
}
[data-theme="dark"] .bill-editable-sub {
    color: #cbd5e1;
}

.bill-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    justify-content: flex-end;
}

.bill-mini-input {
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.95rem;
}

.bill-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.bill-items-table th {
    background: #f1f5f9;
    padding: 10px;
    text-align: left;
    border-bottom: 2px solid #cbd5e1;
}

[data-theme="dark"] .bill-items-table th {
    background: #0f172a;
    border-color: #334155;
}

.bill-items-table td {
    padding: 10px;
    border-bottom: 1px solid #e2e8f0;
}

[data-theme="dark"] .bill-items-table td {
    border-color: #334155;
}

.bill-items-table input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
}

.btn-del-row {
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
}

.btn-add-row {
    background: #0056b3;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: 700;
    cursor: pointer;
}

.bill-summary-wrap {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 20px;
    flex-wrap: wrap;
    gap: 20px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
}

[data-theme="dark"] .bill-summary-wrap {
    background: #0f172a;
}

.bill-totals-right {
    min-width: 250px;
}

.bill-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.grand-bill-row {
    border-top: 2px solid #cbd5e1;
    padding-top: 8px;
    font-size: 1.2rem;
    color: #2563eb;
}

.bill-footer-signature {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px dashed #cbd5e1;
    font-weight: 700;
    font-size: 0.95rem;
}

/* Font Converter Styles */
.font-conv-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.font-textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid #cbd5e1;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1.05rem;
    resize: vertical;
}

[data-theme="dark"] .font-textarea {
    background: #0f172a;
    border-color: #334155;
    color: #f8fafc;
}

.font-output-area {
    background: #f8fafc;
}

.font-actions-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-copy-action {
    background: #10b981;
}

.btn-clear-action {
    background: #64748b;
}

/* Print Only Styles for Bill */
@media print {
    body * {
        visibility: hidden;
    }
    #printable-bill-area,
    #printable-bill-area * {
        visibility: visible;
    }
    #printable-bill-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: #fff !important;
        color: #000 !important;
        padding: 20px;
    }
    .no-print {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .bill-header-grid {
        grid-template-columns: 1fr;
    }
    .bill-meta-row {
        justify-content: flex-start;
    }
    .font-conv-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Land & Hissa Calculator Tabs & Details
   ========================================================================== */
.land-calc-tabs {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.land-tab-btn {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.land-tab-btn:hover {
    background: rgba(255, 255, 255, 0.35);
}

.land-tab-btn.active {
    background: #ffffff;
    color: #0056b3;
    border-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.hissa-instruction-box {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: #1e3a8a;
}

[data-theme="dark"] .hissa-instruction-box {
    background: #1e293b;
    border-color: #60a5fa;
    color: #93c5fd;
}

[data-theme="dark"] .hissa-result-box {
    background: #064e3b !important;
    border-color: #10b981 !important;
}

[data-theme="dark"] #hissa-summary-note {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}

/* ==========================================================================
   New Tools Support (Job Age, All-in-One Photo Resizer, Stamp Duty)
   ========================================================================== */
.job-age-box, .photo-sign-resizer-box, .stamp-duty-box {
    margin: 20px 0 40px;
}

[data-theme="dark"] .jac-quick-date-btn,
[data-theme="dark"] .sdc-quick-btn {
    background: #1e293b !important;
    color: #e2e8f0 !important;
    border-color: #475569 !important;
}

[data-theme="dark"] .apr-preset-pill {
    background: #1e293b;
    color: #cbd5e1;
    border-color: #334155;
}

[data-theme="dark"] .apr-preset-pill.active {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}

[data-theme="dark"] #apr-dropzone {
    background: #0f172a !important;
    border-color: #38bdf8 !important;
}

[data-theme="dark"] #apr-dropzone h4 {
    color: #38bdf8 !important;
}

[data-theme="dark"] #apr-dropzone p {
    color: #94a3b8 !important;
}

[data-theme="dark"] #apr-custom-panel,
[data-theme="dark"] #apr-result-panel > div > div {
    background: #1e293b !important;
    border-color: #334155 !important;
}

[data-theme="dark"] #sdc-results-box table {
    background: #1e293b;
    color: #f1f5f9;
}

[data-theme="dark"] #sdc-results-box thead tr {
    background: #0f172a !important;
    color: #f8fafc !important;
    border-bottom-color: #334155 !important;
}

[data-theme="dark"] #sdc-results-box tbody tr {
    background: #1e293b !important;
    border-bottom-color: #334155 !important;
}

[data-theme="dark"] #sdc-results-box tbody tr:nth-child(even) {
    background: #182234 !important;
}



