/**
 * Main CSS for Brassanas Song Recommendation Plugin
 */

/* Recommendation Form Styles */
.brassanas-recommendation-form {
    max-width: 600px;
    margin: 20px auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.brassanas-recommendation-form h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
}

.brassanas-recommendation-form h3 {
    color: #34495e;
    margin: 25px 0 15px 0;
    font-size: 18px;
    font-weight: 500;
}

/* Form Fields */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.required {
    color: #e74c3c;
}

/* Search Section */
.search-section {
    position: relative;
    margin-bottom: 25px;
}

#song-search {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE5IDE5TDEzIDEzTTE1IDhBNyA3IDAgMSAxIDggMTVBNyA3IDAgMSAxIDE1IDhaIiBzdHJva2U9IiM5OTk5OTkiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=');
    background-repeat: no-repeat;
    background-position: 16px center;
    background-size: 20px;
    padding-left: 50px;
}

/* Search Results */
#search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e1e8ed;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-results-list {
    max-height: 300px;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f1f3f4;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

.search-result-item:last-child {
    border-bottom: none;
}

.song-cover {
    width: 50px;
    height: 50px;
    margin-right: 12px;
    flex-shrink: 0;
}

.song-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.song-cover .no-cover {
    width: 100%;
    height: 100%;
    background: #f1f3f4;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #999;
}

.song-info {
    flex: 1;
    min-width: 0;
}

.song-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-artist {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-album {
    color: #95a5a6;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Selected Song */
#selected-song {
    margin-bottom: 25px;
    display: none;
}

.selected-song-display {
    display: flex;
    align-items: center;
    padding: 16px;
    background: #f8f9fa;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    position: relative;
}

.selected-song-display .song-cover {
    width: 60px;
    height: 60px;
    margin-right: 16px;
}

.selected-song-display .song-info {
    flex: 1;
}

.selected-song-display .song-title {
    font-size: 18px;
    margin-bottom: 6px;
}

.selected-song-display .song-artist {
    font-size: 16px;
    margin-bottom: 4px;
}

.selected-song-display .song-album {
    font-size: 14px;
}

.remove-selection {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.remove-selection:hover {
    background: #c0392b;
}

/* Submit Button */
#submit-recommendation {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#submit-recommendation:hover:not(:disabled) {
    background: linear-gradient(135deg, #2980b9, #1f4e79);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

#submit-recommendation:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Messages */
.brassanas-message {
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

.brassanas-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.brassanas-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.brassanas-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Loading and No Results */
.loading,
.no-results,
.error {
    padding: 20px;
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
}

.loading {
    color: #3498db;
}

.error {
    color: #e74c3c;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .brassanas-recommendation-form {
        margin: 10px;
        padding: 20px;
    }
    
    .brassanas-recommendation-form h2 {
        font-size: 24px;
    }
    
    .search-result-item {
        padding: 10px 12px;
    }
    
    .song-cover {
        width: 40px;
        height: 40px;
        margin-right: 10px;
    }
    
    .selected-song-display .song-cover {
        width: 50px;
        height: 50px;
        margin-right: 12px;
    }
    
    .selected-song-display .song-title {
        font-size: 16px;
    }
    
    .selected-song-display .song-artist {
        font-size: 14px;
    }
}

/* Shortcode Container */
.brassanas-container {
    margin: 20px 0;
}

/* Admin Styles */
.status-pending {
    color: #d63638;
    font-weight: bold;
}

.status-approved {
    color: #00a32a;
    font-weight: bold;
}

.status-rejected {
    color: #d63638;
    font-weight: bold;
}

.row-actions a {
    text-decoration: none;
    margin-right: 8px;
}

.row-actions a:hover {
    text-decoration: underline;
}
