/* Category Voting Plugin Styles - Restaurant Theme */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Fallback for Gilroy - using Inter as close alternative */
* {
    font-family: 'Gilroy', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: #F2EFE8 !important;
    margin: 0;
    padding: 0;
}

.wrapper {
    background: none !important;
}

.current_city {
    visibility: hidden;
}

.category-voting-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    padding-top: 110px; /* 70px header + 40px margin */
    background-color: #F2EFE8;
    min-height: 100vh;
}

.category-voting-container h1 {
    color: #3E3E3F;
    text-align: center;
    margin-bottom: 10px;
    font-size: 21px;
    font-weight: 600;
    line-height: 1.3;
}

.category-voting-container h2 {
    color: #3E3E3F;
    margin-bottom: 30px;
    font-size: 21px;
    font-weight: 600;
}

.category-voting-container h3 {
    color: #3E3E3F;
    margin-bottom: 20px;
    font-size: 21px;
    font-weight: 600;
}

.voting-form {
    background: #F2EFE8;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.voting-form h2 {
    color: #3E3E3F;
    font-size: 17px;
    font-weight: 400;
    margin-bottom: 25px;
}

.post-option {
    margin-bottom: 15px;
    padding: 20px;
    background: #F2EFE8;
    transition: all 0.3s ease;
    border: 1px solid #3E3E3F;
}

.post-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.post-option label {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
    color: #3E3E3F;
    width: 100%;
}

.post-option .post-content {
    flex: 1;
    margin-right: 20px;
}

.post-title {
    font-size: 14px;
    font-weight: 600;
    color: #3E3E3F;
    display: block;
}

.post-excerpt {
    font-size: 14px;
    color: #3E3E3F;
    line-height: 1.4;
    opacity: 0.8;
}

.post-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    flex-shrink: 0;
    appearance: none;
    -webkit-appearance: none;
    background: #F2EFE8;
    border: 2px solid #3E3E3F;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.post-option input[type="checkbox"]:checked {
    background: #3E3E3F;
    border-color: #3E3E3F;
}

.post-option input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #F2EFE8;
    font-size: 14px;
    font-weight: bold;
}

.post-option input[type="checkbox"]:hover {
    border-color: #3E3E3F;
    box-shadow: 0 0 0 2px rgba(62,62,63,0.1);
}

.vote-button {
    background: #3E3E3F;
    color: #F2EFE8;
    border: none;
    padding: 15px 30px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    width: 100%;
}

.vote-button:hover {
    background: #2E2E2F;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(62,62,63,0.3);
}

.voting-results {
    background: #F2EFE8;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.voting-results h2 {
    display: none;
    color: #F2EFE8;
    margin-bottom: 25px;
    font-size: 21px;
}

.voting-results h3 {
    color: #3E3E3F;
    margin-bottom: 20px;
    font-size: 17px;
    font-weight: 400;
}

.top-voted-posts {
    margin-top: 0;
}

.voted-post-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #F2EFE8;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid #3E3E3F;
    transition: transform 0.2s ease;
}

.voted-post-item:hover {
    transform: translateY(-2px);
}

.post-info {
    flex: 1;
    margin-right: 20px;
}

.post-info h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #3E3E3F;
    font-weight: 600;
}

.post-info p {
    margin: 0;
    color: #3E3E3F;
    font-size: 14px;
    line-height: 1.4;
    opacity: 0.8;
}

.vote-info {
    text-align: right;
    min-width: 120px;
}

.vote-percentage {
    display: block;
    font-size: 14px;
    color: #3E3E3F;
    margin-bottom: 8px;
    font-weight: 600;
}

.vote-bar {
    width: 100px;
    height: 8px;
    background: rgba(62,62,63,0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-left: auto;
}

.vote-fill {
    height: 100%;
    background: #3E3E3F;
    transition: width 0.8s ease;
}

/* User Vote Info Styles */
.user-vote-info {
    background: #F2EFE8;
    padding: 20px;
    margin-top: 25px;
    border: 1px solid #3E3E3F;
}

.user-vote-info h3 {
    color: #3E3E3F;
    margin-bottom: 15px;
    font-size: 17px;
    font-weight: 400;
}

.user-vote-info p {
    color: #3E3E3F;
    margin-bottom: 15px;
    font-size: 14px;
}

.user-vote-info ul {
    list-style: none;
    padding: 0;
    margin-bottom: 0;
}

.user-vote-info li {
    background: #3E3E3F;
    color: #F2EFE8;
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

/* Select all buttons */
.select-all-container {
    margin-bottom: 20px;
    text-align: center;
}

.select-all-btn, .deselect-all-btn {
    background: #F2EFE8;
    color: #3E3E3F;
    border: 2px solid #3E3E3F;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    margin: 0 5px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.select-all-btn:hover, .deselect-all-btn:hover {
    background: #3E3E3F;
    color: #F2EFE8;
}

/* Selection counter */
.selection-counter {
    text-align: center;
    margin-bottom: 15px;
    font-size: 14px;
    color: #F2EFE8;
    font-weight: 500;
}

/* Hide voting form initially if user has voted */
.voting-form.hidden {
    display: none;
}

/* Show voting form when vote again is clicked */
.voting-form.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(242,239,232,0.3);
    border-top: 2px solid #F2EFE8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success message */
.success-message {
    background: #3E3E3F;
    color: #F2EFE8;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
    font-size: 14px;
}

/* Error message */
.error-message {
    background: #3E3E3F;
    color: #F2EFE8;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
    font-size: 14px;
}

/* Responsive design */
@media (max-width: 768px) {
    .category-voting-container {
        padding: 20px 15px;
        padding-top: 80px; /* 60px mobile header + 20px margin */
    }
    
    .category-voting-container h1 {
        font-size: 21px;
    }
    
    .voting-form, .voting-results {
        padding: 20px;
    }
    
    .post-option {
        padding: 15px;
    }
    
    .vote-button {
        padding: 12px 25px;
        font-size: 14px;
    }
    
    .voted-post-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .post-info {
        margin-right: 0;
        margin-bottom: 15px;
        width: 100%;
    }
    
    .vote-info {
        text-align: left;
        width: 100%;
    }
    
    .vote-bar {
        width: 100%;
        margin-left: 0;
    }
    
    .post-option label {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .post-option input[type="checkbox"] {
        align-self: flex-end;
    }
}

/* Animation for form submission */
.voting-form.submitting {
    opacity: 0.7;
    pointer-events: none;
}

.voting-form.submitting .vote-button {
    background: rgba(62,62,63,0.7);
    cursor: not-allowed;
}
