/*
 * Cinefreaks Cineverse Plugin Styles
 */

/* --- Follow Button Styles (Icon Only) --- */
.cinefreaks-byline-follow-button-wrapper {
    display: inline-block; /* To allow positioning relative to byline */
    margin-left: 10px; /* Space from other byline elements */
    vertical-align: middle; /* Align with text */
    /* Remove background/shadow if it's just a small icon */
    background: none;
    box-shadow: none;
    padding: 0; /* Remove padding */
}

.cinefreaks-follow-button {
    display: inline-flex;
    align-items: center;
    justify-content: center; /* Center the icon */
    width: 30px; /* Make it a small square button */
    height: 30px;
    padding: 0; /* Remove padding */
    font-size: 1.2em; /* Size of the star icon */
    border-radius: 50%; /* Make it circular */
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--cinesist-heading-color, #e2b304); /* Gold star for Follow */
    background-color: transparent; /* Transparent background by default */
    border: 1px solid var(--cinesist-heading-color, #e2b304); /* Gold border */
    box-shadow: none; /* No shadow by default for subtle look */
}

.cinefreaks-follow-button:hover:not(:disabled) {
    background-color: var(--cinesist-heading-color, #e2b304); /* Gold background on hover */
    color: var(--cinesist-dark-grey, #1a1a1a); /* Dark text on gold */
    transform: scale(1.1); /* Slight pop effect */
    box-shadow: 0 0 8px rgba(226, 179, 4, 0.5); /* Subtle gold glow */
    border-color: var(--cinesist-heading-color, #e2b304);
}

.cinefreaks-follow-button.following {
    background-color: var(--cinesist-accent-color, #e50914); /* Cinesist Red for Following */
    color: var(--cinesist-button-text-color, #f0f0f0); /* White star */
    border-color: var(--cinesist-accent-color, #e50914); /* Red border */
}

.cinefreaks-follow-button.following:hover:not(:disabled) {
    background-color: #cc0000; /* Darker red on hover when Following */
    transform: scale(1.1);
    box-shadow: 0 0 8px rgba(229, 9, 20, 0.5); /* Subtle red glow */
}

.cinefreaks-follow-button i {
    /* No specific styles needed here, parent handles font-size */
}

.cinefreaks-follow-button .screen-reader-text {
    /* Keep screen reader text hidden */
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    word-wrap: normal !important;
}

/* Hide the text spans, only show icons */
.cinefreaks-follow-button .follow-text,
.cinefreaks-follow-button .following-text {
    display: none !important; /* Ensure these are hidden */
}

/* Ensure the icon spans are visible */
.cinefreaks-follow-button .follow-icon,
.cinefreaks-follow-button .following-icon {
    display: flex; /* Use flex to center the icon inside its span */
    justify-content: center;
    align-items: center;
    width: 100%; /* Take full width of button */
    height: 100%; /* Take full height of button */
}

/* Default state: show outline star, hide solid star */
.cinefreaks-follow-button .follow-icon { display: flex; }
.cinefreaks-follow-button .following-icon { display: none; }

/* Following state: hide outline star, show solid star */
.cinefreaks-follow-button.following .follow-icon { display: none; }
.cinefreaks-follow-button.following .following-icon { display: flex; }

.cinefreaks-follow-button:disabled {
    background-color: transparent; /* Keep transparent */
    border-color: #555; /* Grey border */
    color: #555; /* Grey icon */
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
}

/* --- Dashboard Styles (Unchanged from previous) --- */
.cinefreaks-dashboard-container {
    background-color: var(--cinesist-dark-grey, #1a1a1a);
    border-radius: 15px;
    padding: 40px;
    margin: 40px auto;
    box-shadow: var(--cinesist-box-shadow, 0 4px 15px rgba(0, 0, 0, 0.4));
    color: var(--cinesist-text-color, #f0f0f0);
    max-width: 1000px;
    box-sizing: border-box;
}

.cinefreaks-dashboard-container h2 {
    font-family: var(--cinesist-heading-font, 'Oswald'), sans-serif;
    color: var(--cinesist-heading-color, #e2b304);
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.cinefreaks-loading-message,
.cinefreaks-message,
.cinefreaks-error {
    text-align: center;
    font-style: italic;
    color: var(--cinesist-light-grey, #cccccc);
    padding: 20px;
    border: 1px dashed var(--cinesist-border-color, rgba(255, 255, 255, 0.1));
    border-radius: 8px;
    margin-bottom: 20px;
}

.cinefreaks-error {
    color: var(--cinesist-accent-color, #e50914);
    font-weight: bold;
}

.cinefreaks-followed-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cinefreaks-followed-item {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    align-items: center;
    justify-content: space-between;
    background-color: var(--cinesist-dark-grey-lighter, #2a2a2a);
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.cinefreaks-followed-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.cinefreaks-followed-title {
    flex-grow: 1; /* Allows title to take available space */
    font-size: 1.1em;
    font-weight: 600;
    color: var(--cinesist-text-color, #f0f0f0);
    text-decoration: none;
    margin-right: 15px; /* Space between title and type/button */
    transition: color 0.2s ease;
}

.cinefreaks-followed-title:hover {
    color: var(--cinesist-heading-color, #e2b304); /* Gold on hover */
}

.cinefreaks-followed-type {
    font-size: 0.85em;
    color: var(--cinesist-light-grey, #cccccc);
    margin-right: 15px;
    white-space: nowrap; /* Prevent wrapping for type label */
}

.cinefreaks-unfollow-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    font-size: 0.9em;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    background-color: var(--cinesist-accent-color, #e50914); /* Cinesist Red */
    color: var(--cinesist-button-text-color, #f0f0f0);
    border: none;
    transition: all 0.2s ease;
    white-space: nowrap; /* Prevent wrapping */
}

.cinefreaks-unfollow-button:hover {
    background-color: #cc0000; /* Darker red on hover */
    transform: scale(1.02);
}

.cinefreaks-unfollow-button i {
    font-size: 1em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cinefreaks-dashboard-container {
        padding: 20px;
        margin: 20px auto;
    }
    .cinefreaks-dashboard-container h2 {
        font-size: 2em;
    }
    .cinefreaks-followed-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .cinefreaks-followed-title {
        margin-right: 0;
        width: 100%; /* Take full width */
    }
    .cinefreaks-followed-type {
        margin-right: 0;
        width: 100%; /* Take full width */
        text-align: left;
    }
    .cinefreaks-unfollow-button {
        width: 100%; /* Full width button on mobile */
        justify-content: center;
    }
}
