/*
 * Styles for the Plan Comparison Page (page-compare.php)
 * VERSION 2.0: Cleaned up, removed local variables, and aligned with global CSS.
 */

/* REMOVED: The entire :root block was here. All variables are now in global.css. */

.plan-comparison-page { 
    /* REMOVED: font-family and background-color are now inherited from global body style */
    padding: 40px 15px; 
    min-height: 80vh; 
}

.plan-comparison-container { 
    max-width: var(--py-container-width); /* CHANGED: Used CSS variable */
    margin: 0 auto; 
}

.page-header { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    margin-bottom: 25px; 
    flex-wrap: wrap; 
    gap: 15px; 
}

.page-header h1 { 
    font-size: 1.8rem; 
    color: var(--py-secondary-color); /* CHANGED: Used CSS variable */
    margin: 0; 
    flex-grow: 1; 
    text-align: center; 
}

.back-button { 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    background-color: var(--py-card-bg); /* CHANGED: Used CSS variable */
    border: 1px solid var(--py-border-color); /* CHANGED: Used CSS variable */
    padding: 8px 16px; 
    border-radius: var(--py-border-radius); /* CHANGED: Used CSS variable */
    color: var(--py-text-color); /* CHANGED: Used CSS variable */
    font-weight: 500; 
    font-size: 0.9rem; 
    transition: all 0.2s ease; 
}
.back-button:hover { 
    background-color: #f0f2f5; 
}

.comparison-table-container { 
    background-color: var(--py-card-bg); /* CHANGED: Used CSS variable */
    border-radius: var(--py-border-radius); /* CHANGED: Used CSS variable */
    box-shadow: 0 4px 12px rgba(23, 43, 77, 0.05); 
    overflow: hidden; 
}

.table-wrapper { 
    overflow-x: auto; 
}

/* NOTE: This is a custom table, so its specific styles remain. */
.vertical-comparison-table { 
    width: 100%; 
    border-collapse: collapse; 
}

.vertical-comparison-table th, 
.vertical-comparison-table td { 
    padding: 12px 14px; 
    text-align: center; 
    vertical-align: middle; 
    border-bottom: 1px solid var(--py-border-color); /* CHANGED: Used CSS variable */
    min-width: 160px; 
    font-size: 0.85rem; 
}

.vertical-comparison-table thead th { 
    border-bottom-width: 2px; 
    font-size: 0.9rem; 
    font-weight: 600; 
    background-color: var(--py-card-bg); /* CHANGED: Used CSS variable */
}

.plan-header-cell img { 
    display: block; 
    margin: 0 auto 10px auto; 
    max-height: 40px; 
    width: auto; 
}

.plan-header-cell.best-value-col { 
    border-bottom: 3px solid #00875a; /* Kept specific color for "success" state */
}

.vertical-comparison-table tbody th { 
    text-align: left; 
    font-weight: 700; 
    color: var(--py-secondary-color); /* CHANGED: Used CSS variable */
    background-color: #F7F8F9; 
    position: sticky; 
    left: 0; 
    z-index: 1; 
    border-right: 1px solid var(--py-border-color); /* CHANGED: Used CSS variable */
}

.vertical-comparison-table .price-row td { 
    font-weight: 700; 
    font-size: 1rem; 
    color: var(--py-primary-color); /* CHANGED: Used CSS variable */
}

.vertical-comparison-table tr:last-child th, 
.vertical-comparison-table tr:last-child td { 
    border-bottom: none; 
}

.remove-row td { 
    padding-top: 15px; 
    padding-bottom: 5px; 
    border-bottom: 1px solid #ccc; 
}

.btn-remove-plan { 
    background: none; 
    border: 1px solid var(--py-border-color); /* CHANGED: Used CSS variable */
    color: var(--py-text-light); /* CHANGED: Used CSS variable */
    width: 28px; 
    height: 28px; 
    border-radius: 6px; 
    cursor: pointer; 
    font-size: 0.9rem; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    margin: 0 auto; 
    transition: all 0.2s ease; 
}
.btn-remove-plan:hover { 
    background-color: #de350b; /* Kept specific color for "danger" state */
    color: #fff; 
    border-color: #de350b; 
    transform: scale(1.1); 
}

.ai-analysis-section { 
    margin-top: 40px; 
}

.ai-analysis-card { 
    background-color: var(--py-card-bg); /* CHANGED: Used CSS variable */
    border: 1px solid var(--py-border-color); /* CHANGED: Used CSS variable */
    border-radius: var(--py-border-radius); /* CHANGED: Used CSS variable */
    padding: 30px; 
    box-shadow: 0 4px 12px rgba(23, 43, 77, 0.05); 
}
.ai-analysis-card.recommended { 
    border: 2px solid #00875a; /* Kept specific color for "success" state */
}
.ai-analysis-card h2 { 
    text-align: center; 
    font-size: 1.5rem; 
    color: var(--py-secondary-color); /* CHANGED: Used CSS variable */
    margin: 0 0 20px 0; 
}
.ai-analysis-card .analysis-content p { 
    font-size: 1rem; 
    color: var(--py-text-light); /* CHANGED: Used CSS variable */
    line-height: 1.7; 
    margin: 0 0 15px 0; 
}
.ai-analysis-card .analysis-content p:last-child { 
    margin-bottom: 0; 
}
.ai-analysis-card .analysis-content strong { 
    color: var(--py-secondary-color); /* CHANGED: Used CSS variable */
    font-weight: 600; 
}
.ai-analysis-card .analysis-content .category-title { 
    color: var(--py-primary-color); /* CHANGED: Used CSS variable */
    font-weight: 700; 
    display: block; 
    margin-bottom: 5px; 
    font-size: 1.1rem; 
}
.ai-analysis-card .analysis-content .section-divider { 
    border-top: 1px solid var(--py-border-color); /* CHANGED: Used CSS variable */
    margin: 25px 0; 
}

.empty-state-container { 
    text-align: center; 
    padding: 60px 20px; 
    background-color: var(--py-card-bg); /* CHANGED: Used CSS variable */
    border-radius: var(--py-border-radius); /* CHANGED: Used CSS variable */
}

.loading-container { 
    text-align: center; 
    padding: 50px; 
}
.loading-spinner { 
    font-size: 40px; 
    color: var(--py-primary-color); /* CHANGED: Used CSS variable */
    animation: spin 1s linear infinite; 
}
@keyframes spin { 
    0% { transform: rotate(0deg); } 
    100% { transform: rotate(360deg); } 
}