/* Styles for the single tariff page */
.kw-single-tariff-page .kw-tariffs-page-header {
    margin-bottom: 20px;
}

.kw-tariffs-page-title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.kw-single-tariff-logo-container {
    flex-shrink: 0;
}

.kw-single-tariff-logo {
    max-height: 60px;
    max-width: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.kw-tariffs-page-title {
    margin: 0;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 600px) {
    .kw-tariffs-page-title-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .kw-single-tariff-logo {
        max-height: 50px;
        max-width: 100px;
    }
    
    .kw-tariffs-page-title {
        text-align: center;
    }
}

#kw-single-tariff-container {
    padding: 20px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 25px; /* Space before the related tariffs or main CTA */
}

/* If it's an old tariff, the .kw-tariffs-old-tariff class is added to #kw-single-tariff-container.
   This will apply the red left border from all-tariffs-styles.css.
   The .kw-tariffs-unavailable-banner will also be used from all-tariffs-styles.css.
   We need to ensure padding works correctly with the border.
*/
#kw-single-tariff-container.kw-tariffs-old-tariff {
    /* The border-left is applied by .kw-tariffs-old-tariff from common styles */
    /* Adjust padding if necessary, but the existing padding on #kw-single-tariff-container should be inside the border */
}

#kw-single-tariff-container.kw-tariffs-old-tariff .kw-tariffs-unavailable-banner {
    /* Adjust margins if the container's padding is different from list item's padding */
    margin: -20px -20px 20px -20px; /* To span the container's padding */
}


.kw-single-tariff-details-wrapper {
    /* Container for all tariff details below the (optional) banner */
}

.kw-single-tariff-supplier {
    font-size: 1.3em;
    color: #333;
    margin-top: 0;
    margin-bottom: 15px;
}

.kw-single-tariff-supplier a {
    font-weight: bold;
    color: #0073aa;
    text-decoration: none;
}
.kw-single-tariff-supplier a:hover {
    text-decoration: underline;
}

.kw-single-tariff-details-wrapper h3 {
    font-size: 1.4em;
    color: #2c3e50;
    margin-top: 25px;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}
.kw-single-tariff-details-wrapper h3:first-child {
    margin-top: 0;
}


.kw-single-tariff-key-details {
    list-style: none;
    padding-left: 0;
    margin-bottom: 20px;
}

.kw-single-tariff-key-details li {
    padding: 8px 0;
    font-size: 1.05em;
    color: #444;
    border-bottom: 1px dotted #f0f0f0;
}
.kw-single-tariff-key-details li:last-child {
    border-bottom: none;
}

.kw-single-tariff-key-details li strong {
    color: #23282d;
    margin-right: 8px;
}

/* Rates Table Styling (can inherit from common or be specific) */
.kw-single-tariff-rates-table {
    width: 100%;
    margin-top: 10px;
    margin-bottom: 20px;
    border-collapse: collapse;
}

.kw-single-tariff-rates-table th,
.kw-single-tariff-rates-table td {
    text-align: left;
    padding: 10px 8px;
    border: 1px solid #ddd;
}

.kw-single-tariff-rates-table th {
    background-color: #f7f7f7;
    font-weight: bold;
    color: #333;
}

.kw-single-tariff-rates-table td {
    font-size: 0.95em;
}

.kw-single-tariff-notes {
    font-size: 1em;
    line-height: 1.6;
    color: #555;
    background-color: #f9f9f9;
    padding: 15px;
    border-left: 3px solid #0073aa;
    margin-bottom: 20px;
}

.kw-single-tariff-original-url {
    margin-top: 20px;
    font-size: 1em;
}
.kw-single-tariff-original-url a {
    color: #0073aa;
    text-decoration: none;
    font-weight: bold;
}
.kw-single-tariff-original-url a:hover {
    text-decoration: underline;
}

/* Styles for Related Tariffs Section */
/* .kw-tariffs-section is in all-tariffs-styles.css and provides top border and margins */

.kw-tariffs-section-title { /* Title for sections like "Related Tariffs" */
    font-size: 1.6em; 
    color: #2c3e50;
    margin-top: 0; /* Reset top margin as .kw-tariffs-section provides padding-top */
    margin-bottom: 20px;
}

#kw-related-tariffs-section {
    /* Specific overrides if needed, but general classes should cover it */
}

#kw-related-tariffs-list-container {
    /* Container for the list itself */
}

.kw-related-tariffs-list {
    list-style: none;
    padding-left: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px; /* Space between grid items */
}

.kw-related-tariffs-item {
    background-color: #fdfdfd; /* Slightly off-white */
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: box-shadow 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.kw-related-tariffs-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: #c0c0c0;
}

.kw-related-tariffs-link {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: inherit; /* Inherit text color, specific elements will set their own */
    height: 100%; /* Make link fill the item for better clickability with grid */
    box-sizing: border-box;
}

.kw-related-tariff-name {
    font-size: 1.15em;
    color: #0073aa; /* WordPress blue for link-like header */
    margin-top: 0;
    margin-bottom: 8px;
    font-weight: bold;
}

.kw-related-tariff-supplier {
    font-size: 0.95em;
    color: #444;
    margin-bottom: 5px;
}
.kw-related-tariff-meta {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 0;
}



/* Error/Not Found Messages */
.kw-tariffs-error,
.kw-tariffs-no-tariffs { /* Reusing class from all-tariffs for consistency */
    font-style: italic;
    color: #721c24; /* Dark red for errors */
    text-align: center;
    padding: 30px 15px;
    font-size: 1.1em;
    background-color: #f8d7da; /* Light red background */
    border: 1px dashed #f5c6cb; /* Reddish border */
    border-radius: 4px;
}
