/* ProSoftwareTools — extras for calculator landing pages (loads after style.css) */

.calc-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}
@media (max-width: 600px) {
    .calc-inputs { grid-template-columns: 1fr; }
}
.calc-inputs .form-group { margin-bottom: 0; }
.tool-wrapper input[type="date"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.2s;
}
.tool-wrapper input[type="date"]:focus {
    outline: none;
    border-color: #4f46e5;
}

.error-box {
    display: none;
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 20px;
    font-weight: 500;
}

.result-box {
    display: none;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    margin-top: 10px;
}
.result-summary {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 20px;
    text-align: center;
}
.result-highlight {
    text-align: center;
    margin-bottom: 20px;
}
.result-highlight .big-number {
    font-size: 3rem;
    font-weight: 800;
    color: #4f46e5;
    line-height: 1.1;
    display: block;
}
.result-highlight .big-label {
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 500;
}

/* SEO content + FAQ */
.seo-content {
    max-width: 800px;
    margin: 40px auto 0;
    line-height: 1.75;
    color: #334155;
}
.seo-content h2 {
    font-size: 1.5rem;
    color: #1e293b;
    margin: 35px 0 15px;
}
.seo-content h3 {
    font-size: 1.15rem;
    color: #1e293b;
    margin: 25px 0 10px;
}
.seo-content p { margin-bottom: 15px; }

.faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 12px;
    background: #fff;
    overflow: hidden;
}
.faq-question {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 16px 20px;
    font-size: 1.02rem;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: inherit;
}
.faq-question::after {
    content: '\2039';
    transform: rotate(-90deg);
    font-size: 1.4rem;
    color: #4f46e5;
    transition: transform 0.2s;
}
.faq-item.open .faq-question::after { transform: rotate(90deg); }
.faq-answer {
    display: none;
    padding: 0 20px 16px;
    color: #475569;
}
.faq-item.open .faq-answer { display: block; }

.related-tools {
    max-width: 800px;
    margin: 40px auto 0;
}
.related-tools h2 {
    font-size: 1.3rem;
    color: #1e293b;
    margin-bottom: 15px;
}
.related-tools ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
}
.related-tools li a {
    display: inline-block;
    background: #eef2ff;
    color: #4f46e5;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.92rem;
    transition: background 0.2s;
}
.related-tools li a:hover { background: #e0e7ff; }

/* Engine 2: percentage calculator additions */
.subject-row {
    display: grid;
    grid-template-columns: 90px 1fr 1fr 40px;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}
@media (max-width: 600px) {
    .subject-row { grid-template-columns: 70px 1fr 1fr 36px; gap: 6px; }
    .subject-row .subject-label { font-size: 0.8rem; }
}
.subject-row .subject-label {
    font-weight: 600;
    color: #475569;
    font-size: 0.9rem;
}
.subject-row input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
}
.subject-row input[type="number"]:focus { outline: none; border-color: #4f46e5; }
.remove-subject {
    background: #fef2f2;
    color: #b91c1c;
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    transition: background 0.2s;
}
.remove-subject:hover { background: #fecaca; }

.mini-tool {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin-top: 25px;
}
.mini-tool h3 { margin: 0 0 12px; font-size: 1.05rem; color: #1e293b; }
.mini-tool .mini-row { display: flex; gap: 10px; flex-wrap: wrap; }
.mini-tool input[type="number"] {
    flex: 1;
    min-width: 120px;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
}
.mini-tool input[type="number"]:focus { outline: none; border-color: #4f46e5; }
.mini-result { margin-top: 10px; font-weight: 600; color: #4f46e5; }

/* Engines 3-8: shared input, hash, uuid, file & converter styles */
.psw-select, .psw-text-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
}
.psw-select:focus, .psw-text-input:focus, .psw-textarea:focus { outline: none; border-color: #4f46e5; }
.psw-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.98rem;
    font-family: inherit;
    resize: vertical;
}
.psw-textarea.mono, .hash-value { font-family: 'Courier New', monospace; font-size: 0.88rem; }

.words-output {
    background: #eef2ff;
    border: 2px dashed #c7d2fe;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}
.words-output .words-label { font-size: 0.85rem; color: #64748b; display: block; margin-bottom: 8px; }
.words-output .words-text { font-size: 1.25rem; font-weight: 700; color: #312e81; margin: 0; line-height: 1.5; }

.hash-row { margin-bottom: 18px; }
.hash-row label { font-weight: 600; color: #475569; font-size: 0.9rem; display: block; margin-bottom: 6px; }
.hash-line { display: flex; gap: 8px; }
.hash-line .hash-value { flex: 1; background: #f8fafc; }
.hash-copy { flex-shrink: 0; width: 46px; }

.check-row { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.psw-check { display: flex; align-items: center; gap: 8px; font-weight: 500; color: #475569; cursor: pointer; }
.psw-check input { width: 17px; height: 17px; accent-color: #4f46e5; cursor: pointer; }

.psw-file-input {
    width: 100%;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    font-family: inherit;
    flex: 1;
    min-width: 200px;
}
.psw-file-hidden { display: none; }
.psw-file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 35px 20px;
    border: 2px dashed #c7d2fe;
    border-radius: 12px;
    background: #f5f7ff;
    color: #4f46e5;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    text-align: center;
}
.psw-file-label:hover { background: #eef2ff; border-color: #4f46e5; }
.psw-file-label i { font-size: 1.5rem; }

.convert-item {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 10px;
    background: #fff;
}
.convert-name { font-weight: 600; color: #1e293b; flex: 1; min-width: 140px; word-break: break-all; }
.convert-status { color: #475569; font-size: 0.92rem; }
.convert-download {
    padding: 8px 16px !important;
    font-size: 0.88rem !important;
    text-decoration: none;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.privacy-note {
    margin-top: 18px;
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
}
.privacy-note i { color: #16a34a; }

/* Phase 2: loan amortization, GST presets, invoice */
.table-scroll { overflow-x: auto; }
.amort-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}
.amort-table th, .amort-table td {
    padding: 9px 12px;
    text-align: right;
    border-bottom: 1px solid #e2e8f0;
}
.amort-table th:first-child, .amort-table td:first-child { text-align: left; }
.amort-table th { background: #eef2ff; color: #312e81; font-weight: 600; }
.amort-table tr:nth-child(even) td { background: #f8fafc; }

.rate-preset { padding: 8px 18px !important; }
.rate-preset.active { background: #4f46e5 !important; color: #fff !important; }

.invoice-head-row, .invoice-item-row {
    display: grid;
    grid-template-columns: 3fr 70px 100px 90px 40px;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}
.invoice-head-row { font-size: 0.82rem; font-weight: 600; color: #64748b; margin-bottom: 4px; }
.invoice-item-row input[type="number"] {
    width: 100%;
    padding: 10px 10px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
}
.invoice-item-row input:focus { outline: none; border-color: #4f46e5; }
.item-amount { text-align: right; font-weight: 600; color: #1e293b; font-size: 0.92rem; }
@media (max-width: 640px) {
    .invoice-head-row { display: none; }
    .invoice-item-row { grid-template-columns: 1fr 55px 75px 34px; }
    .invoice-item-row .item-amount { display: none; }
}
.invoice-totals {
    max-width: 320px;
    margin-left: auto;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 20px;
}
.invoice-totals div { display: flex; justify-content: space-between; padding: 5px 0; color: #475569; }
.invoice-totals .grand { border-top: 2px solid #e2e8f0; margin-top: 6px; padding-top: 10px; font-size: 1.1rem; color: #1e293b; }
