/**
 * Priority Board Frontend Styles
 * Matches the design from the provided Feature Upvote image
 */

/* Container */
.priority-board-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Voting Explanation */
.priority-board-explanation {
    background: #f8f9fa;
    border: 2px solid #e74c3c;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.priority-board-explanation p {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    font-weight: 500;
}

/* Filters */
.priority-board-filters {
    margin-bottom: 30px;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.priority-board-filter-row {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.priority-board-search {
    flex: 1;
    min-width: 300px;
}

.priority-search-form {
    display: flex;
    gap: 10px;
}

.priority-search-form input[type="search"] {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.priority-search-form button {
    padding: 10px 20px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.priority-search-form button:hover {
    background: #005a87;
}

.priority-board-sort select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

/* Tag Filters */
.priority-tag-filters {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-label {
    font-weight: 600;
    color: #666;
    margin-right: 10px;
}

.tag-filter {
    padding: 6px 12px;
    background: #f5f5f5;
    color: #666;
    text-decoration: none;
    border-radius: 20px;
    font-size: 13px;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.tag-filter:hover {
    background: #e5e5e5;
    text-decoration: none;
}

.tag-filter.active {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

/* Grid Layout */
.priority-board-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

/* Priority Cards - Matching the image design */
.priority-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    display: flex;
    gap: 15px;
    transition: all 0.2s ease;
    position: relative;
    align-items: flex-start;
}

.priority-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

/* Icon Section */
.priority-icon-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 128px;
    flex-shrink: 0;
}

.priority-icon {
    width: 128px;
    height: 128px;
    border: solid 1px #ccc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    background: transparent;
}

.priority-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: solid 1px #ccc;
    border-radius: 8px;
    object-position: 50% 30%;
}

.priority-icon:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Content Section */
.priority-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Vote Section */
.priority-vote-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
    flex-shrink: 0;
}

.priority-vote-btn {
    background: white;
    border: 1px solid #e1e5e9;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 12px;
    border-radius: 8px;
    transition: all 0.2s;
    color: #666;
    min-width: 70px;
    min-height: 80px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.priority-vote-btn:hover {
    background: #f8f9fa;
    color: #333;
    border-color: #d1d5db;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.priority-vote-btn.voted {
    color: #ff4757;
    border-color: #ff4757;
    background: rgba(255, 71, 87, 0.05);
}

.priority-vote-btn.voted .vote-icon {
    color: #ff4757;
}

.vote-icon {
    font-size: 20px;
    transition: all 0.2s;
    line-height: 1;
}

.vote-count {
    font-weight: 600;
    font-size: 16px;
    min-width: 20px;
    text-align: center;
    line-height: 1;
}

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

/* Tags - Matching the image colors */
.priority-tags {
    margin-bottom: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.priority-tag {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
}

/* Tag Colors - Based on the image */
.priority-tag.tag-blue,
.priority-tag.tag-default {
    background: #4285f4; /* Blue for IMPROVEMENT */
}

.priority-tag.tag-green {
    background: #34a853; /* Green for NEW */
}

.priority-tag.tag-red {
    background: #ea4335; /* Red for bugs */
}

.priority-tag.tag-purple {
    background: #9c27b0; /* Purple for features */
}

.priority-tag.tag-orange {
    background: #ff9800; /* Orange for enhancements */
}

.priority-tag.tag-gray {
    background: #757575; /* Gray for operations */
}

.priority-tag.tag-teal {
    background: #009688; /* Teal for integrations */
}

/* Title */
.priority-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

.priority-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.priority-title a:hover {
    color: #0073aa;
    text-decoration: none;
}

/* Excerpt */
.priority-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

/* Meta Information */
.priority-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #999;
    flex-wrap: wrap;
    gap: 10px;
}

.priority-date {
    color: #999;
}

.priority-comments-link {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.priority-comments-link:hover {
    color: #0073aa;
    text-decoration: none;
}

.priority-comments {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    transition: all 0.2s ease;
}

.priority-comments-link:hover .priority-comments {
    color: #0073aa;
}

.comment-icon {
    font-size: 14px;
}

/* No Results */
.priority-board-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.priority-board-no-results p {
    font-size: 16px;
    margin: 0;
}

/* Pagination */
.priority-board-pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.priority-board-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
    text-decoration: none;
    transition: all 0.2s;
}

.priority-board-pagination .page-numbers:hover {
    background: #f5f5f5;
    border-color: #ccc;
    text-decoration: none;
}

.priority-board-pagination .page-numbers.current {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.priority-board-pagination .page-numbers.prev,
.priority-board-pagination .page-numbers.next {
    font-weight: 600;
}

/* Loading States */
.priority-board-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.priority-board-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

/* Vote Animation */
.priority-vote-btn.voting {
    pointer-events: none;
    opacity: 0.7;
}

.priority-vote-btn.voting .vote-icon {
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .priority-board-container {
        padding: 15px;
    }
    
    .priority-board-filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .priority-board-search {
        min-width: auto;
    }
    
    .priority-search-form {
        flex-direction: column;
    }
    
    .priority-card {
        padding: 15px;
        gap: 15px;
        flex-direction: column;
        position: relative;
    }
    
    .priority-icon-section {
        min-width: 100%;
        width: 100%;
        align-items: stretch;
    }
    
    .priority-icon {
        width: 100%;
        height: 200px;
        border: solid 1px #ccc;
        border-radius: 8px;
        font-size: 20px;
    }
    
    .priority-content {
        width: 100%;
        padding-right: 80px; /* Make space for vote button */
    }
    
    .priority-vote-section {
        position: absolute;
        bottom: 30%;
        right: 15px;
        min-width: 60px;
        z-index: 10;
    }
    
    .priority-vote-btn {
        min-width: 60px;
        min-height: 70px;
        padding: 12px 8px;
    }
    
    .priority-title {
        font-size: 15px;
    }
    
    .priority-excerpt {
        font-size: 13px;
    }
    
    .priority-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .priority-tag-filters {
        justify-content: center;
    }
    
    .filter-label {
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .priority-board-container {
        padding: 10px;
    }
    
    .priority-board-filters {
        padding: 15px;
    }
    
    .priority-card {
        padding: 12px;
        gap: 10px;
    }
    
    .priority-icon {
        height: 180px; /* Slightly smaller on very small screens */
    }
    
    .priority-content {
        padding-right: 70px; /* Less padding for smaller vote button */
    }
    
    .priority-vote-section {
        min-width: 50px;
        bottom: 30%;
        right: 12px;
    }
    
    .priority-vote-btn {
        min-width: 50px;
        min-height: 60px;
        padding: 8px 6px;
    }
    
    .vote-icon {
        font-size: 16px;
    }
    
    .vote-count {
        font-size: 12px;
    }
    
    .priority-title {
        font-size: 16px;
    }
    
    .priority-excerpt {
        font-size: 12px;
    }
    
    .priority-tags {
        gap: 6px;
    }
    
    .priority-tag {
        padding: 3px 8px;
        font-size: 10px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .priority-card {
        border: 2px solid #333;
    }
    
    .priority-vote-btn {
        border: 1px solid #666;
    }
    
    .priority-tag {
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .priority-card,
    .priority-vote-btn,
    .tag-filter,
    .vote-icon {
        transition: none;
    }
    
    .priority-card:hover {
        transform: none;
    }
    
    .priority-vote-btn.voting .vote-icon {
        animation: none;
    }
}

/* Print styles */
@media print {
    .priority-board-filters,
    .priority-board-pagination,
    .priority-vote-section {
        display: none;
    }
    
    .priority-card {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
        margin-bottom: 15px;
    }
    
    .priority-title a {
        color: #333 !important;
        text-decoration: none;
    }
}
