/* User Suggestions & Voting - Enhanced Frontend Styles */

/* Submit Trigger Button */
.usv-submit-trigger-container {
    margin-bottom: 20px;
    text-align: center;
}

.usv-submit-modal-trigger {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.usv-submit-modal-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Submit Form */
.usv-submit-form {
    max-width: 700px;
    margin: 30px auto;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* Submit form in modal */
.usv-submit-modal .usv-submit-form {
    margin: 0;
    max-width: none;
}

.usv-submit-form h3 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
}

.usv-form-group {
    margin-bottom: 20px;
}

.usv-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #fff;
    font-size: 15px;
}

.usv-form-group input[type="text"],
.usv-form-group textarea,
.usv-form-group input[type="file"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    font-size: 15px;
    background: rgba(255,255,255,0.95);
    transition: all 0.3s ease;
}

.usv-form-group input[type="text"]:focus,
.usv-form-group textarea:focus {
    outline: none;
    border-color: #fff;
    background: #fff;
    box-shadow: 0 0 15px rgba(255,255,255,0.5);
}

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

.usv-help-text {
    display: block;
    margin-top: 5px;
    color: rgba(255,255,255,0.9);
    font-size: 13px;
}

/* Image Preview in Form */
.usv-image-preview {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255,255,255,0.95);
    border-radius: 8px;
    text-align: center;
}

.usv-image-preview img {
    max-width: 300px;
    max-height: 300px;
    border-radius: 5px;
    display: block;
    margin: 0 auto 10px;
}

.usv-remove-image {
    background: #eb3349;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
}

.usv-remove-image:hover {
    background: #f45c43;
}

.usv-submit-btn {
    padding: 14px 30px;
    background: #fff;
    color: #667eea;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.usv-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.usv-message {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 8px;
    font-weight: 500;
}

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

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

/* Suggestions List */
.usv-suggestions-list {
    margin: 30px 0;
}

.usv-suggestion-item {
    display: flex;
    gap: 20px;
    padding: 25px;
    margin-bottom: 20px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.usv-suggestion-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 20px rgba(102,126,234,0.15);
    transform: translateY(-2px);
}

.usv-suggestion-votes {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-width: 140px;
    padding: 15px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 10px;
}

/* Compact Voting Area */
.usv-suggestion-votes-compact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-width: 80px;
    padding: 12px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 10px;
}

.usv-vote-stats-compact {
    text-align: center;
}

.usv-vote-count-small {
    font-size: 11px;
    color: #666;
    margin-top: 3px;
}

.usv-vote-modal-trigger {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
}

.usv-vote-modal-trigger:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102,126,234,0.4);
}

.usv-vote-modal-trigger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.usv-vote-btn {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    min-width: 100px;
    justify-content: center;
}

.usv-vote-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.usv-agree-btn.active {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #fff;
    border-color: #11998e;
}

.usv-disagree-btn.active {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    color: #fff;
    border-color: #eb3349;
}

.usv-vote-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.usv-vote-icon {
    font-size: 20px;
    line-height: 1;
}

.usv-vote-stats {
    text-align: center;
    padding: 10px 0;
}

.usv-vote-percentage {
    font-size: 28px;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 5px;
}

.usv-vote-count {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.usv-suggestion-content {
    flex: 1;
}

.usv-suggestion-title {
    margin: 0 0 12px 0;
    font-size: 20px;
}

.usv-suggestion-title a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.usv-suggestion-title a:hover {
    color: #667eea;
}

.usv-badge {
    display: inline-block;
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 20px;
    margin-left: 10px;
    font-weight: 600;
}

.usv-badge-adopted {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #fff;
}

.usv-suggestion-meta {
    font-size: 14px;
    color: #888;
    margin-bottom: 12px;
}

.usv-suggestion-meta span {
    margin-right: 15px;
}

.usv-suggestion-image {
    margin: 15px 0;
    border-radius: 8px;
    overflow: hidden;
}

.usv-suggestion-image img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.usv-suggestion-description {
    color: #555;
    line-height: 1.6;
    font-size: 15px;
}

/* Progress Bar */
.usv-progress-bar {
    width: 100%;
    height: 25px;
    background: #f0f0f0;
    border-radius: 20px;
    margin-top: 15px;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.1);
}

.usv-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: bold;
    transition: width 0.5s ease;
}

/* Suggestion Detail */
.usv-suggestion-detail {
    margin: 30px 0;
}

.usv-suggestion-header {
    display: flex;
    gap: 25px;
    padding: 30px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.usv-suggestion-votes-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    min-width: 160px;
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
}

.usv-vote-stats-large {
    text-align: center;
    padding: 15px 0;
}

.usv-vote-percentage-large {
    font-size: 36px;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 8px;
}

.usv-vote-count-detail {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.usv-suggestion-main {
    flex: 1;
}

.usv-suggestion-main h2 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 28px;
}

.usv-suggestion-body {
    padding: 30px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.usv-suggestion-image-detail {
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
}

.usv-suggestion-image-detail img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Progress Section */
.usv-progress-section {
    padding: 30px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.usv-progress-section h3 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 22px;
}

.usv-progress-bar-large {
    width: 100%;
    height: 35px;
    background: #f0f0f0;
    border-radius: 20px;
    margin: 20px 0;
    overflow: hidden;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.1);
}

.usv-progress-bar-large .usv-progress-fill {
    height: 100%;
    font-size: 15px;
}

.usv-progress-updates {
    margin-top: 30px;
}

.usv-progress-updates h4 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 18px;
}

.usv-progress-update-item {
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-left: 4px solid #667eea;
    margin-bottom: 15px;
    border-radius: 8px;
}

.usv-progress-update-meta {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
}

.usv-progress-update-meta span {
    margin-right: 15px;
}

.usv-progress-percentage {
    font-weight: bold;
    color: #667eea;
    font-size: 14px;
}

.usv-progress-message {
    color: #444;
    line-height: 1.6;
    font-size: 15px;
}

.usv-back-link {
    margin-top: 20px;
}

.usv-back-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.3s ease;
}

.usv-back-link a:hover {
    color: #764ba2;
}

/* Responsive */
@media (max-width: 768px) {
    .usv-suggestion-item {
        flex-direction: column;
    }
    
    .usv-suggestion-votes,
    .usv-suggestion-votes-compact {
        min-width: 100%;
        flex-direction: row;
        justify-content: space-around;
    }
    
    .usv-suggestion-header {
        flex-direction: column;
    }
    
    .usv-suggestion-votes-large {
        min-width: 100%;
        flex-direction: row;
        justify-content: space-around;
    }
}

/* Vote Modal */
.usv-vote-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.usv-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.usv-modal-content {
    position: relative;
    z-index: 2;
    background: #fff;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.usv-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    transition: color 0.3s ease;
}

.usv-modal-close:hover {
    color: #333;
}

.usv-modal-content h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 22px;
}

.usv-modal-content p {
    color: #666;
    margin-bottom: 20px;
}

.usv-modal-vote-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.usv-modal-vote-btn {
    flex: 1;
    padding: 15px 25px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.usv-modal-vote-btn.usv-agree-btn {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #fff;
    border-color: #11998e;
}

.usv-modal-vote-btn.usv-agree-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(17, 153, 142, 0.4);
}

.usv-modal-vote-btn.usv-disagree-btn {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    color: #fff;
    border-color: #eb3349;
}

.usv-modal-vote-btn.usv-disagree-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(235, 51, 73, 0.4);
}

.usv-modal-vote-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.usv-modal-vote-btn .usv-vote-icon {
    font-size: 24px;
}

/* Large Modal for Submit Form */
.usv-modal-content-large {
    max-width: 700px;
    width: 90%;
}

.usv-submit-modal .usv-modal-content {
    padding: 0;
    overflow: hidden;
    background: transparent;
}

.usv-submit-modal .usv-submit-form {
    border-radius: 15px;
    margin: 0;
    position: relative;
}

/* Light close button for dark backgrounds */
.usv-modal-close-light {
    color: rgba(255, 255, 255, 0.8);
    z-index: 10;
}

.usv-modal-close-light:hover {
    color: #fff;
}

