/**
 * TitleThrive Calculator - Extras (Chart & PDF)
 * v0.7.1: Added canvas visibility and min-height
 * v0.7.2: Added print clarity for PDF export
 */

/* Chart & PDF Action Buttons */
/* Note: Button styles moved to inline CSS in CalculatorShortcode.php for better specificity */

/* v0.7.3-hotfix: Comprehensive PDF export styling */
#tt-calc-result,
.tt-calc-result,
.tt-calc-result-wrap,
.tt-calc-results {
    background: #fff;
    color: #111;
}

#tt-calc-result table,
.tt-calc-result table {
    border-collapse: collapse;
    width: 100%;
}

#tt-calc-result th,
#tt-calc-result td,
.tt-calc-result th,
.tt-calc-result td {
    border: 1px solid #ddd;
    padding: 6px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .tt-calc-chart-wrap {
        padding: 15px;
    }
}

/* Print/PDF-specific styles */
@media print {
    /* v0.7.2: Hide all interactive elements when printing */
    .tt-calc-btn,
    .tt-calc-actions,
    .tt-calc-btn-pdf,
    button {
        display: none !important;
    }

    .tt-calc-chart-wrap {
        page-break-inside: avoid;
        border: none;
        background: none;
    }

    .tt-calc-results-table {
        page-break-inside: avoid;
    }

    .tt-calc-disclaimer {
        page-break-before: avoid;
    }
}

/* Accessibility: Hidden but readable by screen readers */
.tt-calc-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* PDF Export specific class (used during generation) */
.tt-pdf-export {
    background: #fff;
    color: #000;
}

.tt-pdf-export table {
    border-collapse: collapse;
    width: 100%;
}

.tt-pdf-export th,
.tt-pdf-export td {
    padding: 10px;
    text-align: left;
    border: 1px solid #ddd;
}

.tt-pdf-export th {
    background-color: #f5f5f5;
    font-weight: 600;
}
