.opinion-container {
    border: 1px solid #ccc;
    border-radius: 10px;
    margin: 15px;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
    background-color: white;
    width: 400px;
    display: flex; /* Use flexbox */
    flex-direction: column; /* Arrange children vertically */
    justify-content: space-between; /* Spread the header, content, and footer */
    height: 100%; /* Full height for stable layout */
}

.opinion-container-full{
    width: 100%;
}

.hand{
    cursor: pointer;
}

.opinion-header {
    font-weight: bold;
    color: #333;
    background-color: #cdcbcb;
    border-radius: 10px 10px 0 0;
    padding: 10px;
}

.opinion-sub-header {
    font-weight: bold;
    font-size: 12px;
    color: #555;
    background-color: #f0f0f0;    
    padding: 5px 10px;
}


.opinion-content {
    padding: 10px;
    font-size: 16px;
    color: #333;
    flex-grow: 1; /* Take up remaining space */
}

.opinion-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
    padding: 10px;
    border-top: 1px solid #eee; /* Optional: separate footer visually */
}

.views-container, .likes-container, .comment-container {
    display: flex;
    align-items: center;
    margin-left: 15px;
}

.icon {
    width: 20px;
    height: 20px;
    margin-right: 5px;
}

/* container */
#some-opinions-wrapper {
    display: flex;
    justify-content: center; /* Center the items */
    flex-wrap: wrap; /* Enable wrapping of items */
    gap: 20px; /* Add some space between items */
    padding: 20px; /* Optional: padding around the container */
}

/* INPUT FORM */
/* General Form Container Styling */
#insert-opinion form {
    max-width: 1000px;
    min-width: 380px;
    margin: 0 auto; /* Center the form horizontally */
    padding: 20px;
    background-color: #f9f9f9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-family: 'Arial', sans-serif;
    box-sizing: border-box; /* Ensure padding and width are included */
}

/* Styling for radio buttons, dropdown, and textarea */
input[type="radio"] {
    display: none; /* Hide the default radio button */
}

input[type="radio"] + label {
    display: inline-block;
    padding: 10px 20px;
    border: 2px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="radio"]:checked + label {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

/* Dropdown */
select {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    border: 2px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    background-color: #fff;
    transition: border-color 0.3s ease;
    box-sizing: border-box; /* Ensure it respects container's size */
}

select:focus {
    border-color: #4CAF50;
    outline: none;
}

input[type="text"] {
    background-color: #fff;
    transition: border-color 0.3s ease;
    box-sizing: border-box; /* Ensure it respects container's size */
    width: 100%;
    padding: 15px;
    margin-top: 10px;
    border: 2px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    font-family: 'Arial', sans-serif;
}

input[type="text"]:focus {
    border-color: #4CAF50;
    outline: none;
}


/* Textarea */
textarea {
    width: 100%;
    padding: 15px;
    margin-top: 10px;
    border: 2px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    font-family: 'Arial', sans-serif;
    background-color: #fff;
    resize: vertical;
    min-height: 150px;
    transition: border-color 0.3s ease;
    box-sizing: border-box; /* Ensure it respects container's size */
}

textarea:focus {
    border-color: #4CAF50;
    outline: none;
}

.anonymous-name {
 font-weight: bold;
}

/* Buttons */
.form-buttons {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

button {
    padding: 12px 25px;
    font-size: 16px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#cancel-btn {
    background-color: #f44336;
    color: white;
    margin-right: 10px;
}

#cancel-btn:hover {
    background-color: #d32f2f;
}

#send-btn {
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
}

#send-btn:disabled {
    background-color: gray;
    cursor: not-allowed; /* Ensure user knows it can't be clicked */
}

#send-btn:hover:enabled {
    background-color: #388E3C;
}

/* Responsive Design for Mobile */
@media (max-width: 600px) {
    #insert-opinion form {
        padding: 15px;
    }
    
    textarea {
        min-height: 120px;
    }
    
    button {
        width: 100%;
        margin-top: 10px;
    }
    
    .form-buttons {
        flex-direction: column;
        align-items: stretch;
    }
}


/* SHOW THE OPINIONS */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    margin: 20px auto;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

@media (max-width: 800px) {
    .filter-bar {
        max-width:580px;
    }
}

.filter-group {
    margin: 5px;
}

.filter-group label {
    margin-right: 5px;
    font-weight: bold;
}

.filter-group select, .filter-group input {
    padding: 5px 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 200px;
}

.filter-btn {
    background-color: #007bff;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.filter-btn:hover {
    background-color: #0056b3;
}
