/* Styling for dynamically added buttons in RSS feed lists */

/* Base button styles */
.podcast-item button,
.episode-item button {
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: none;
    margin: 4px;
    min-width: 100px;
    white-space: nowrap;
    /* Ensure consistent sizing */
    box-sizing: border-box;
    width: 120px;
    text-align: center;
    height: 36px;
    line-height: 20px;
    flex-shrink: 0;
}

/* "List Episodes" button */
.add-button {
    background-color: #3b82f6; /* Tailwind blue-500 */
    color: white;
}

.add-button:hover {
    background-color: #2563eb; /* Tailwind blue-600 */
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.add-button:active {
    transform: translateY(0px);
}

/* "Subscribe" button */
.subscribe-button {
    background-color: #10b981; /* Tailwind green-500 */
    color: white;
}

.subscribe-button:hover {
    background-color: #059669; /* Tailwind green-600 */
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.subscribe-button:active {
    transform: translateY(0px);
}

/* "Remove" button styling */
button[textContent="Remove"] {
    background-color: #ef4444; /* Tailwind red-500 */
    color: white;
}

button[textContent="Remove"]:hover {
    background-color: #dc2626; /* Tailwind red-600 */
}

/* Improved list items for better button alignment */
.podcast-item, .episode-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.podcast-item:last-child, .episode-item:last-child {
    border-bottom: none;
}

/* Improved layout for podcast items - better alignment for buttons */
.podcast-item {
    justify-content: space-between;
}

/* Content container for better flex layout */
.podcast-content {
    display: flex;
    align-items: center;
    flex-grow: 1;
    min-width: 0; /* Prevent flex items from overflowing */
    margin-right: 8px;
}

.podcast-image {
    border-radius: 4px;
    margin-right: 12px;
    width: 60px;
    height: 60px;
    object-fit: cover;
    flex-shrink: 0;
}

.podcast-title, .episode-title {
    flex-grow: 1;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0; /* Allow text to truncate properly */
}

/* Button container for consistent alignment */
.button-container {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Mobile optimizations */
@media (max-width: 640px) {
    /* Stack items vertically on mobile */
    .podcast-item, .episode-item {
        flex-direction: column;
        align-items: stretch;
    }
    
    .podcast-content {
        margin-bottom: 12px;
        margin-right: 0;
    }
    
    .button-container {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
    }
    
    .podcast-item button,
    .episode-item button {
        width: calc(50% - 8px); /* Two buttons per row with gap */
        margin: 4px 0;
    }
    
    /* Single button should be full width */
    .episode-item .button-container button:only-child {
        width: 100%;
    }
}

/* Even smaller screens */
@media (max-width: 400px) {
    .button-container {
        flex-direction: column;
    }
    
    .podcast-item button,
    .episode-item button {
        width: 100%;
    }
}