/**
 * Resource & Tool Pages Styles
 *
 * Styles for Credit Card Finder, Calculators, and other interactive tools
 *
 * @package FFOA_Custom
 * @since 1.1.0
 */

/* ============================================================
   CREDIT CARD FINDER PAGE
   ============================================================ */

.page-credit-card-finder {
    background-color: #f8f9fa;
    min-height: 100vh;
}

.credit-card-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Header */
.credit-card-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #e0e0e0;
}

.credit-card-header .page-title {
    font-size: 2.75rem;
    font-weight: 700;
    color: #222E51;
    margin-bottom: 1rem;
}

.credit-card-header .page-subtitle {
    font-size: 1.375rem;
    color: #C2B97F;
    font-weight: 600;
}

/* Tool Intro */
.tool-intro {
    max-width: 800px;
    margin: 0 auto 3rem;
    font-size: 1.125rem;
    line-height: 1.7;
    color: #555;
    text-align: center;
}

/* Search Form */
.search-form-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 3rem;
}

.credit-card-search-form .form-group {
    margin-bottom: 1.75rem;
}

.credit-card-search-form label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #222E51;
    margin-bottom: 0.5rem;
}

.credit-card-search-form .required {
    color: #dc3545;
    margin-left: 0.25rem;
}

.credit-card-search-form input[type="number"],
.credit-card-search-form select {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid #d0d0d0;
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

.credit-card-search-form input[type="number"]:focus,
.credit-card-search-form select:focus {
    outline: none;
    border-color: #C2B97F;
}

.credit-card-search-form .field-hint {
    display: block;
    font-size: 0.875rem;
    color: #777;
    margin-top: 0.375rem;
}

.form-actions {
    margin-top: 2rem;
    text-align: center;
}

.search-button {
    background: #C2B97F;
    color: #ffffff;
    padding: 1rem 3rem;
    font-size: 1.125rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(194, 185, 127, 0.3);
}

.search-button:hover {
    background: #a89b6a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(194, 185, 127, 0.4);
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 3rem 2rem;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    border: 4px solid #e0e0e0;
    border-top-color: #C2B97F;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-spinner p {
    font-size: 1.125rem;
    color: #555;
}

/* Results Container */
.results-container {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.results-container.show {
    opacity: 1;
    transform: translateY(0);
}

.recommendations-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Education Box */
.education-box {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f2ff 100%);
    border-left: 4px solid #2196F3;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 3rem;
}

.education-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #222E51;
    margin-bottom: 1rem;
}

.education-explanation {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: #444;
    margin-bottom: 1rem;
}

.education-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
}

.education-list li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
}

.education-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #06A77D;
    font-weight: 700;
}

/* Credit Card List */
.credit-card-list {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

.credit-card-item {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.credit-card-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: #C2B97F;
}

.card-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #d0d0d0;
}

.card-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #222E51;
    margin-bottom: 0.5rem;
}

.card-issuer {
    font-size: 1rem;
    color: #666;
    margin-bottom: 0.75rem;
}

.welcome-bonus {
    font-size: 1.0625rem;
    font-weight: 600;
    color: #06A77D;
    margin: 0;
}

.card-details {
    margin-bottom: 1.5rem;
}

.card-stats {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    display: grid;
    gap: 0.75rem;
}

.card-stats li {
    font-size: 0.9375rem;
    color: #444;
}

.card-stats strong {
    color: #222E51;
}

.recommendation-reason {
    background: #fffbf0;
    border-left: 3px solid #FFA500;
    padding: 1rem;
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.benefit-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.benefit-tag {
    display: inline-block;
    background: #C2B97F;
    color: #ffffff;
    padding: 0.375rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 20px;
}

.pros-cons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.pros h4,
.cons h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #222E51;
    margin-bottom: 0.75rem;
}

.pros ul,
.cons ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pros li,
.cons li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #444;
}

.pros li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #06A77D;
    font-weight: 700;
}

.cons li:before {
    content: "✗";
    position: absolute;
    left: 0;
    color: #dc3545;
    font-weight: 700;
}

.apply-button {
    display: inline-block;
    background: #2196F3;
    color: #ffffff;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.apply-button:hover {
    background: #1976D2;
    transform: translateY(-2px);
    color: #ffffff;
}

/* No Results / Error Messages */
.no-results,
.error-message {
    background: #fff3cd;
    border-left: 4px solid #FFA500;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.no-results p,
.error-message p {
    font-size: 1.0625rem;
    color: #856404;
    margin: 0;
}

/* Disclaimer */
.disclaimer {
    background: #f8f9fa;
    border: 2px solid #d0d0d0;
    border-radius: 8px;
    padding: 1.5rem;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #555;
}

.disclaimer strong {
    color: #222E51;
}

.disclaimer small {
    display: block;
    margin-top: 0.75rem;
    color: #777;
}

/* Educational Notice */
.educational-notice {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-top: 3rem;
}

.educational-notice h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #222E51;
    margin-bottom: 1rem;
}

.educational-notice p {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #555;
    margin: 0;
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */

@media (max-width: 768px) {
    .credit-card-container {
        padding: 2rem 1.5rem;
    }

    .credit-card-header .page-title {
        font-size: 2rem;
    }

    .credit-card-header .page-subtitle {
        font-size: 1.125rem;
    }

    .search-form-section,
    .recommendations-section {
        padding: 2rem 1.5rem;
    }

    .credit-card-item {
        padding: 1.5rem;
    }

    .pros-cons {
        grid-template-columns: 1fr;
    }

    .search-button {
        width: 100%;
        padding: 1rem 2rem;
    }
}

@media (max-width: 480px) {
    .credit-card-container {
        padding: 1.5rem 1rem;
    }

    .credit-card-header .page-title {
        font-size: 1.75rem;
    }

    .education-box,
    .credit-card-item {
        padding: 1.25rem;
    }

    .benefit-tags {
        justify-content: center;
    }
}

/* ============================================================
   SINGLE CALCULATOR PAGES
   ============================================================ */

.page-single-calculator {
    background-color: #f8f9fa;
    min-height: 100vh;
}

.calculator-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

/* Header Section */
.calculator-header-section {
    margin-bottom: 3rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: #C2B97F;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: #a89b6a;
}

.calculator-page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #222E51;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.calculator-page-subtitle {
    font-size: 1.125rem;
    color: #666;
    line-height: 1.6;
    max-width: 700px;
}

/* Calculator Tool Section */
.calculator-tool-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.calculator-tool {
    max-width: 100%;
}

/* Form Styles */
.single-calc-form {
    margin-bottom: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .form-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #222E51;
    margin-bottom: 0.5rem;
}

.form-group input[type="number"] {
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid #d0d0d0;
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

.form-group input[type="number"]:focus {
    outline: none;
    border-color: #C2B97F;
}

.calc-button {
    width: 100%;
    background: #C2B97F;
    color: #ffffff;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calc-button:hover {
    background: #a89b6a;
    transform: translateY(-2px);
}

/* Results Section */
.calc-results-box {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    border-left: 4px solid #06A77D;
}

.calc-results-box h3 {
    font-size: 1.375rem;
    font-weight: 700;
    color: #222E51;
    margin-bottom: 1.5rem;
    text-align: center;
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .results-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.result-box {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.result-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: #222E51;
}

/* Disclaimer Section */
.calculator-disclaimer-section {
    background: #fff8e6;
    border-radius: 12px;
    padding: 1.75rem 2rem;
    margin-bottom: 2rem;
    border-left: 4px solid #FF9800;
}

.calculator-disclaimer-section h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #222E51;
    margin-bottom: 0.75rem;
}

.calculator-disclaimer-section p {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #555;
    margin: 0;
}

/* Other Calculators Section */
.other-calculators-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.other-calculators-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #222E51;
    margin-bottom: 1.5rem;
    text-align: center;
}

.calculator-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .calculator-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

.calc-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
    color: #222E51;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.calc-link:hover {
    background: #C2B97F;
    color: #ffffff;
    transform: translateX(4px);
    border-color: #C2B97F;
}

/* Responsive */
@media (max-width: 768px) {
    .calculator-container {
        padding: 1.5rem 1rem 3rem;
    }

    .calculator-page-title {
        font-size: 2rem;
    }

    .calculator-tool-section {
        padding: 1.75rem 1.25rem;
    }

    .calculator-links {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   COMMON TERMS GLOSSARY PAGE
   ============================================================ */

.page-common-terms {
    background-color: #f8f9fa;
    min-height: 100vh;
}

.terms-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
}

/* Header Section */
.terms-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 3px solid #C2B97F;
}

.terms-header .page-title {
    font-size: 2.75rem;
    font-weight: 700;
    color: #222E51;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.terms-header .page-subtitle {
    font-size: 1.25rem;
    color: #C2B97F;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.terms-header .page-description {
    font-size: 1.0625rem;
    color: #666;
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
}

/* Terms Content */
.terms-content {
    background: #ffffff;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.term-entry {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e0e0e0;
}

.term-entry:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.term-name {
    font-size: 1.375rem;
    font-weight: 700;
    color: #222E51;
    margin-bottom: 0.75rem;
    letter-spacing: 0.5px;
}

.term-definition {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: #555;
    margin: 0;
}

/* WordPress editor content styles */
.terms-content h3 {
    font-size: 1.375rem;
    font-weight: 700;
    color: #222E51;
    margin: 2.5rem 0 0.75rem 0;
    letter-spacing: 0.5px;
}

.terms-content h3:first-child {
    margin-top: 0;
}

.terms-content p {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: #555;
    margin: 0 0 2rem 0;
}

/* Footer Section */
.terms-footer {
    text-align: center;
    padding: 2rem 1.5rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.terms-footer p {
    font-size: 0.9375rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.back-to-resources {
    display: inline-flex;
    align-items: center;
    color: #C2B97F;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.back-to-resources:hover {
    color: #a89b6a;
}

/* Responsive */
@media (max-width: 768px) {
    .terms-container {
        padding: 2rem 1rem 3rem;
    }

    .terms-header .page-title {
        font-size: 2rem;
    }

    .terms-header .page-subtitle {
        font-size: 1.125rem;
    }

    .terms-content {
        padding: 1.75rem 1.25rem;
    }

    .term-name,
    .terms-content h3 {
        font-size: 1.25rem;
    }

    .term-definition,
    .terms-content p {
        font-size: 1rem;
    }
}
