/* UpVoteNow Frontend Styles */

.upvotenow-container {
    max-width: 800px;
    margin: 0 auto;
    font-family: inherit;
}

/* Description */
.upvotenow-description {
    background: #f8f9fa;
    border-left: 4px solid #007cba;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 0 4px 4px 0;
}

.upvotenow-description p:last-child {
    margin-bottom: 0;
}

/* Notices */
.upvotenow-notice {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 4px;
    border-left: 4px solid;
}

.upvotenow-notice-info {
    background: #e7f3ff;
    border-left-color: #007cba;
    color: #0073aa;
}

.upvotenow-notice-warning {
    background: #fff8e1;
    border-left-color: #ffb900;
    color: #b26b00;
}

.upvotenow-notice-error {
    background: #ffeaea;
    border-left-color: #dc3232;
    color: #a00;
}

/* Vote Info */
.upvotenow-vote-info {
    background: #f0f6fc;
    border: 1px solid #c3d9ff;
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 14px;
}

.upvotenow-limit-reached {
    color: #d63638;
    font-weight: 600;
}

/* Controls */
.upvotenow-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.upvotenow-sort {
    display: flex;
    align-items: center;
    gap: 8px;
}

.upvotenow-sort label {
    font-weight: 600;
    margin: 0;
}

.upvotenow-sort-select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

/* Buttons */
.upvotenow-btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    line-height: 1.4;
}

.upvotenow-btn-primary {
    background: #007cba;
    color: white;
}

.upvotenow-btn-primary:hover {
    background: #005a87;
    color: white;
}

.upvotenow-btn-secondary {
    background: #f6f7f7;
    color: #2c3338;
    border: 1px solid #dcdcde;
}

.upvotenow-btn-secondary:hover {
    background: #f0f0f1;
    color: #2c3338;
}

/* Submit Form */
.upvotenow-submit-form {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 25px;
}

.upvotenow-submit-form h4 {
    margin: 0 0 15px 0;
    color: #2c3338;
}

.upvotenow-field {
    margin-bottom: 15px;
}

.upvotenow-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3338;
}

.upvotenow-field input[type="text"],
.upvotenow-field textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.upvotenow-field textarea {
    resize: vertical;
    min-height: 80px;
}

.upvotenow-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Topics List */
.upvotenow-topics-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.upvotenow-topic {
    display: flex;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 15px;
    transition: box-shadow 0.2s ease;
}

.upvotenow-topic:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Vote Section */
.upvotenow-vote-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 15px;
    min-width: 50px;
}

.upvotenow-vote-btn {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
}

.upvotenow-vote-btn:hover {
    background: #e8f4f8;
    border-color: #007cba;
}

.upvotenow-vote-btn.voted {
    background: #007cba;
    border-color: #007cba;
    color: white;
}

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

.upvotenow-vote-display {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    color: #666;
}

.upvotenow-vote-icon {
    font-size: 16px;
    font-weight: bold;
}

.upvotenow-vote-count {
    margin-top: 5px;
    font-weight: 600;
    font-size: 14px;
    color: #2c3338;
    text-align: center;
}

/* Topic Content */
.upvotenow-topic-content {
    flex: 1;
}

.upvotenow-topic-header {
    margin-bottom: 10px;
}

.upvotenow-topic-title {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3338;
    line-height: 1.3;
}

.upvotenow-badge {
    display: inline-block;
    background: #007cba;
    color: white;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
    vertical-align: middle;
}

.upvotenow-pending-badge {
    display: inline-block;
    background: #f0f0f1;
    color: #646970;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
    vertical-align: middle;
    border: 1px solid #c3c4c7;
}

.upvotenow-topic-meta {
    font-size: 13px;
    color: #666;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.upvotenow-topic-date {
    color: #999;
}

.upvotenow-topic-description {
    color: #555;
    line-height: 1.5;
}

.upvotenow-topic-description p:last-child {
    margin-bottom: 0;
}

/* Empty State */
.upvotenow-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.upvotenow-empty p {
    margin: 0 0 10px 0;
}

/* Loading State */
.upvotenow-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Error State */
.upvotenow-error {
    color: #d63638;
    background: #ffeaea;
    border: 1px solid #f5c6cb;
    padding: 10px 15px;
    border-radius: 4px;
    margin: 10px 0;
}

/* Toast Messages */
.upvotenow-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #2c3338;
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    z-index: 9999;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: upvotenow-slide-in 0.3s ease;
}

.upvotenow-toast.success {
    background: #00a32a;
}

.upvotenow-toast.error {
    background: #d63638;
}

@keyframes upvotenow-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .upvotenow-container {
        padding: 0 15px;
    }
    
    .upvotenow-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .upvotenow-sort {
        justify-content: space-between;
    }
    
    .upvotenow-topic {
        flex-direction: column;
        gap: 15px;
    }
    
    .upvotenow-vote-section {
        flex-direction: row;
        justify-content: flex-start;
        margin-right: 0;
        gap: 10px;
    }
    
    .upvotenow-actions {
        flex-direction: column;
    }
    
    .upvotenow-toast {
        right: 15px;
        left: 15px;
        max-width: none;
    }
}

/* Accessibility */
.upvotenow-vote-btn:focus,
.upvotenow-btn:focus,
.upvotenow-sort-select:focus,
.upvotenow-field input:focus,
.upvotenow-field textarea:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .upvotenow-topic {
        border-width: 2px;
    }
    
    .upvotenow-vote-btn,
    .upvotenow-btn {
        border-width: 2px;
    }
}
