/**
 * Magazine Manager Frontend Styles
 */

/* Response form */
.magazine-response-form {
    background: #f5f5f5;
    padding: 30px;
    border-radius: 8px;
    margin: 40px 0;
}

.magazine-response-form h3 {
    margin-top: 0;
    margin-bottom: 20px;
}

.magazine-response-form .form-field {
    margin-bottom: 20px;
}

.magazine-response-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.magazine-response-form input[type="text"],
.magazine-response-form input[type="email"],
.magazine-response-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.magazine-response-form textarea {
    min-height: 150px;
    resize: vertical;
}

.magazine-response-form button {
    background: #2271b1;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.magazine-response-form button:hover {
    background: #1a5a8a;
}

.magazine-response-form button:disabled {
    background: #999;
    cursor: not-allowed;
}

.magazine-response-form .response-message {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: none;
}

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

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

/* Search form */
.magazine-search-form {
    background: #f5f5f5;
    padding: 25px;
    border-radius: 8px;
    margin: 30px 0;
}

.magazine-search-form .search-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.magazine-search-form .search-field {
    flex: 1;
    min-width: 200px;
}

.magazine-search-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 14px;
}

.magazine-search-form input,
.magazine-search-form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.magazine-search-form .custom-date-range {
    display: none;
}

.search-loading {
    text-align: center;
    padding: 40px;
    display: none;
}

.search-loading:after {
    content: "Ricerca in corso...";
    font-size: 16px;
    color: #666;
}

/* Search results */
.search-results {
    margin-top: 30px;
}

.search-results .results-count {
    font-weight: bold;
    margin-bottom: 20px;
    font-size: 18px;
}

.search-results .no-results {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #666;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.result-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.result-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.result-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.result-content {
    padding: 20px;
}

.result-content h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.result-content h3 a {
    color: #333;
    text-decoration: none;
}

.result-content h3 a:hover {
    color: #2271b1;
}

.result-category {
    display: inline-block;
    padding: 4px 12px;
    background: var(--category-color, #2271b1);
    color: white;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 10px;
}

.result-edition {
    font-size: 14px;
    color: #666;
    margin: 10px 0;
}

.result-edition a {
    color: #2271b1;
    text-decoration: none;
}

.result-edition a:hover {
    text-decoration: underline;
}

.result-excerpt {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
    line-height: 1.6;
}

/* Category section styling */
.category-section {
    margin: 40px 0;
    padding: 30px;
    border-left: 4px solid var(--category-color, #2271b1);
    background: rgba(0, 0, 0, 0.02);
}

.category-section h2 {
    color: var(--category-color, #2271b1);
    margin-top: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .magazine-search-form .search-row {
        flex-direction: column;
    }
    
    .magazine-search-form .search-field {
        width: 100%;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
}
