/*
 * Styles for the Comparison Bar and Buttons
 * VERSION 2.1: Added Favorite Button Styles.
 */

/* ==========================================================================
   1. Compare Button Styles (On-page buttons)
   ========================================================================== */
.plan-compare-button {
    background: linear-gradient(to right, #f12711, var(--py-accent-color));
    color: white !important;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: var(--py-border-radius);
    width: 100%;
}

/* Specific adjustment for buttons inside action groups */
.sp-action-buttons .plan-compare-button,
.py-related-actions .plan-compare-button {
    width: auto;
}

.plan-compare-button:hover {
    filter: brightness(110%);
    color: white !important;
}

.plan-compare-button.added {
    background: #28a745; /* Green color when added */
    filter: none;
    box-shadow: 0 2px 5px rgba(40, 167, 69, 0.3);
}

.plan-compare-button.added:hover {
    background-color: #218838;
}

/* ==========================================================================
   2. Floating Comparison Bar Styles
   ========================================================================== */
.comparison-bar {
    display: none; /* Hidden by default, shown by JS */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--py-secondary-color);
    color: white;
    /* Z-Index kept at 9999 so Filter Sidebar (10001) appears on top */
    z-index: 9999;
    box-shadow: 0 -3px 12px rgba(0,0,0,0.25);
    padding: 8px 15px;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.comparison-bar-content {
    max-width: var(--py-container-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.comparison-bar-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.comparison-bar-info .fi {
    font-size: 1.2em;
    color: var(--py-accent-color);
}

#comparison-bar-text {
    font-size: 0.9em;
    font-weight: 500;
}

.comparison-bar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.comparison-bar-button {
    background-color: #e67e22;
    color: white;
    padding: 6px 14px;
    font-size: 0.85em;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.comparison-bar-button:hover {
    background-color: #d35400;
    color: white;
}

.comparison-bar-clear-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 20px;
    line-height: 26px;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.3s;
    padding: 0;
}

.comparison-bar-clear-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* ==========================================================================
   3. Favorite Button Styles (Global)
   ========================================================================== */

/* Base style for our custom buttons */
.py-btn {
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none !important;
    border-radius: 5px;
}

/* Specific styles for the favorite button */
.favorite-button {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
}

.favorite-button:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
}

.favorite-button .favorite-icon {
    color: #ffc107; /* Yellow star color */
    font-size: 1.1em;
}

/* Style for when a plan IS a favorite */
.favorite-button.is-favorite {
    background-color: #ffc107;
    color: #212529;
    border-color: #f5b301;
}

.favorite-button.is-favorite:hover {
    background-color: #f5b301;
}

.favorite-button.is-favorite .favorite-icon {
    color: #fff; /* White star on yellow background */
}