/* sirmax-airplay.css */

/* --- General Container for the Frontend Song List --- */
.sirmax-airplay-frontend-container {
    max-width: 1200px; /* Adjust as needed */
    margin: 20px auto; /* Centers the container and adds vertical spacing */
    padding: 20px;
    background: #1a1a1a; /* Dark background for the main content area */
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.5); /* Subtle shadow for depth */
    color: #fff; /* Default text color for the container */
}

/* --- Search Bar Styling --- */
.sirmax-search-controls {
    margin-bottom: 20px;
    text-align: center; /* Center the search input */
}

.sirmax-input {
    width: 100%;
    max-width: 400px; /* Keeps the search bar from being excessively wide */
    padding: 10px 15px;
    border: 1px solid #0dbf73; /* Border color matching your theme */
    border-radius: 25px; /* Rounded input field */
    background-color: #333;
    color: #fff;
    font-size: 1em;
    box-sizing: border-box; /* Ensures padding and border are included in the width */
    transition: all 0.3s ease; /* Smooth transition for focus effects */
}

.sirmax-input::placeholder {
    color: #888; /* Placeholder text color */
}

.sirmax-input:focus {
    outline: none; /* Remove default outline */
    border-color: #0d8a57; /* Darker green on focus */
    box-shadow: 0 0 8px rgba(13, 191, 115, 0.5); /* Glowing effect on focus */
}

/* --- Song List Container --- */
.sirmax-song-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* Space between song cards */
    justify-content: center; /* Centers cards if they don't fill a row */
    margin-bottom: 20px;
}

/* --- Individual Song Card Styling --- */
.sirmax-card {
    background: #1c1c1c;
    border: 2px solid #0dbf73;
    border-radius: 10px;
    padding: 15px;
    width: 280px; /* Fixed width for cards */
    color: #fff;
    text-align: center;
    box-shadow: 0 0 10px rgba(13, 191, 115, 0.4);
    box-sizing: border-box; /* Ensures padding and border are included in the width */
    display: flex; /* Enables flexbox for content within the card */
    flex-direction: column; /* Stacks content vertically */
    justify-content: space-between; /* Pushes the button to the bottom */
    transition: transform 0.2s ease-in-out; /* Smooth hover effect */
}

.sirmax-card:hover {
    transform: translateY(-5px); /* Lifts the card slightly on hover */
}

.sirmax-cover {
    width: 100%; /* Make image responsive within the card */
    max-width: 150px; /* Ensures image doesn't get too big */
    height: auto; /* Maintain aspect ratio */
    border-radius: 8px;
    margin: 0 auto 10px; /* Center image and add bottom margin */
    display: block; /* Ensures margin auto works for centering */
}

.sirmax-card h3 {
    margin: 10px 0;
    font-size: 18px;
    min-height: 40px; /* Ensures consistent height for titles, preventing layout shifts */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limits title to 2 lines */
    -webkit-box-orient: vertical;
}

.sirmax-card p {
    margin: 0; /* Remove default paragraph margin */
    color: #ccc;
    min-height: 20px; /* Ensures consistent height for artist name */
    margin-bottom: 10px; /* Space below artist name */
}

/* --- Airplay Button Styling --- */
.sirmax-airplay-btn {
    background: #0dbf73;
    color: #fff;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    margin-top: auto; /* Pushes the button to the bottom of the flex container (card) */
    transition: background 0.3s ease;
    display: block; /* Make button take full width within its context */
    width: 100%; /* Fill card width */
    box-sizing: border-box; /* Include padding/border in width */
}

.sirmax-airplay-btn:hover {
    background: #0aa85f;
}

/* --- Modal Styling --- */
.sirmax-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0; top: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8); /* Darker overlay for better focus */
    overflow: auto; /* Enable scrolling if content overflows */
}

.sirmax-modal-content {
    background: #111;
    color: #fff;
    padding: 30px;
    max-width: 400px;
    margin: 80px auto; /* Centers the modal and provides vertical spacing */
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(13, 191, 115, 0.5);
    position: relative; /* Needed for absolute positioning of close button */
}

.sirmax-modal-content label {
    display: block; /* Make labels take full width */
    margin-top: 15px; /* Space above labels */
    margin-bottom: 5px; /* Space below labels */
    font-weight: bold;
    color: #0dbf73; /* Label color matching theme */
}

.sirmax-modal-content input[type="text"],
.sirmax-modal-content input[type="datetime-local"] {
    display: block;
    width: 100%;
    padding: 10px;
    border: 1px solid #0dbf73; /* Input border matching theme */
    border-radius: 5px;
    background-color: #333;
    color: #fff;
    font-size: 14px;
    box-sizing: border-box;
}

.sirmax-modal-content input[type="text"]:focus,
.sirmax-modal-content input[type="datetime-local"]:focus {
    outline: none;
    border-color: #0d8a57;
    box-shadow: 0 0 5px rgba(13, 191, 115, 0.5);
}

.sirmax-modal-content button[type="submit"] {
    background: #0dbf73;
    color: #fff;
    font-weight: bold;
    border: none;
    padding: 10px 20px; /* Consistent button padding */
    border-radius: 25px; /* Consistent button border-radius */
    margin-top: 20px; /* More space above the submit button */
    cursor: pointer;
    transition: background 0.3s ease;
}

.sirmax-modal-content button[type="submit"]:hover {
    background: #0aa85f;
}

.sirmax-close {
    position: absolute; /* Position relative to .sirmax-modal-content */
    top: 10px;
    right: 15px;
    font-size: 24px;
    color: #ff4757;
    cursor: pointer;
    line-height: 1; /* Adjust line height for better vertical alignment of 'x' */
}

.sirmax-close:hover {
    color: #e6001a; /* Darker red on hover */
}

/* --- AJAX Response Message Styling --- */
#sirmax-response {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    font-size: 1em;
}

#sirmax-response.success {
    background-color: rgba(13, 191, 115, 0.2); /* Light green background */
    color: #0dbf73; /* Green text */
}

#sirmax-response.error {
    background-color: rgba(255, 71, 87, 0.2); /* Light red background */
    color: #ff4757; /* Red text */
}


/* --- Frontend Pagination Styling --- */
.sirmax-pagination-controls {
    text-align: center;
    margin-top: 30px; /* More space above pagination */
    padding: 15px 0;
    background: #222; /* Slightly different background for pagination block */
    border-radius: 10px;
}

.sirmax-pagination-link,
.sirmax-pagination-link-wrapper span { /* Span for the current page number */
    display: inline-block;
    padding: 8px 15px; /* More generous padding for links */
    margin: 0 5px;
    background: #0dbf73;
    color: white;
    text-decoration: none;
    border-radius: 25px; /* Rounded buttons */
    font-weight: bold;
    transition: background 0.3s ease, color 0.3s ease;
    min-width: 40px; /* Ensure a minimum width for consistent sizing */
    text-align: center;
    box-sizing: border-box;
}

.sirmax-pagination-link:hover {
    background: #0d8a57;
    color: #e0e0e0;
}

.sirmax-pagination-link-wrapper.current-page span {
    background: #0d8a57; /* Darker green for the current page */
    cursor: default;
    box-shadow: 0 0 8px rgba(13, 191, 115, 0.5); /* Subtle glow for current page */
    color: #fff; /* Ensure text color is white on current page */
}

.sirmax-pagination-dots {
    display: inline-block;
    padding: 8px 0;
    margin: 0 5px;
    color: #ccc;
    font-weight: bold;
    cursor: default;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .sirmax-airplay-frontend-container {
        margin: 10px; /* Reduce margin on smaller screens */
        padding: 15px;
    }

    .sirmax-card {
        width: 100%; /* Make cards take full width on small screens */
        max-width: 300px; /* Cap max width for cards */
    }

    .sirmax-modal-content {
        margin: 40px 20px; /* Adjust modal margin for smaller screens */
        padding: 20px;
    }

    .sirmax-pagination-link,
    .sirmax-pagination-link-wrapper span {
        padding: 6px 10px; /* Smaller padding for pagination links */
        margin: 0 3px; /* Reduce margin between links */
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .sirmax-card h3 {
        font-size: 16px;
    }

    .sirmax-airplay-btn {
        font-size: 0.9em;
        padding: 8px 15px;
    }

    .sirmax-modal-content h3 {
        font-size: 1.2em;
    }

    .sirmax-modal-content input,
    .sirmax-modal-content button {
        font-size: 13px;
        padding: 8px;
    }
}