/* FokusKontrol Survey - Modern Professional Design */

/* Import Google Fonts */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    color: #1a202c;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    font-size: 14px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Header styles - Ultra compact */
.header {
    text-align: center;
    margin-bottom: 12px;
    padding: 12px 0;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-radius: 8px;
    color: white;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.header h1 {
    font-size: 1.4rem;
    margin: 0;
    font-weight: 600;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.header .subtitle {
    display: none; /* Hide subtitle to save space */
}

.header-controls {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}

#filter-popup-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-content {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.popup-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
}

.back-link {
    text-align: left;
    margin-bottom: 15px;
}

.back-link a {
    color: #4f46e5;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(79, 70, 229, 0.1);
    transition: all 0.2s ease;
}

.back-link a:hover {
    background: rgba(79, 70, 229, 0.2);
    transform: translateX(-2px);
}

.feature-category {
    background: rgba(255, 255, 255, 0.2);
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    backdrop-filter: blur(10px);
}


/* Filters - Modern and compact */
.filters {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 16px;
    margin-bottom: 16px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.filters h3 {
    margin-bottom: 12px;
    color: #374151;
    font-size: 1rem;
    font-weight: 600;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #e5e7eb;
    background: white;
    cursor: pointer;
    font-size: 0.875rem;
    color: #374151;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-btn:hover {
    border-color: #4f46e5;
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

.filter-btn.active {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border-color: #4f46e5;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* Progress bar - Minimal */
.progress-info {
    background: transparent;
    padding: 0;
    margin-bottom: 8px;
    border-radius: 0;
    border: none;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: #e0f2fe;
    margin-bottom: 6px;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0ea5e9 0%, #0284c7 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 2px;
}

.progress-text {
    display: none;
}

/* Features table - Modern and professional */
.features-list {
    background: white;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.features-table {
    width: 100%;
    border-collapse: collapse;
}

.features-table th {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: #374151;
    font-weight: 600;
    padding: 6px 8px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.features-table td {
    padding: 2px 8px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
    font-size: 0.8rem;
    line-height: 1.1;
}

/* Fixed width for STATUS column to prevent width changes during filtering */
.features-table th:first-child,
.features-table td:first-child {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
}

.feature-row {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    border-left: 4px solid transparent;
}

.feature-row:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.feature-row.answered {
    background: rgba(34, 197, 94, 0.02);
}

.feature-row.answered.want {
    border-left-color: #22c55e;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.05) 0%, rgba(34, 197, 94, 0.02) 100%);
}

.feature-row.answered.neutral {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, rgba(245, 158, 11, 0.02) 100%);
}

.feature-row.answered.dont-want {
    border-left-color: #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(239, 68, 68, 0.02) 100%);
}

.feature-id {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    color: #374151;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    display: inline-block;
}

.feature-status {
    font-size: 1.25rem;
    text-align: center;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.feature-title {
    font-weight: 600;
    color: #111827;
    font-size: 0.95rem;
    line-height: 1.4;
}

.feature-category-inline {
    color: #9ca3af;
    font-weight: 400;
    font-size: 0.8em;
}

/* Styles for idea.asp header and content */
.idea-header {
    display: none; /* Hide the original header */
}

/* Individual feature page styles - Compact two-column layout */
.feature-main-content {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    margin-bottom: 16px;
}

.feature-left-column {
    display: flex;
    flex-direction: column;
}

.feature-right-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-title-main {
    font-size: 1.1rem; 
    font-weight: 500; 
    color: #111827;
}

.feature-header {
    margin-bottom: 12px;
}

.feature-content {
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
    margin-bottom: 24px;
}

.feature-content p {
    color: #374151;
    line-height: 1.5;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.feature-content p:first-child {
    font-size: 1rem;
    font-weight: 400;
    color: #374151;
}

.feature-content em {
    color: #6b7280;
    font-style: italic;
    background: rgba(79, 70, 229, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Response form - Compact */
.response-form {
    background: white;
    padding: 0;
    margin-bottom: 16px;
    border-radius: 0;
    border: none;
    box-shadow: none;
}

.response-section {
    background: white;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.response-section h3 {
    color: #111827;
    margin-bottom: 12px;
    font-size: 1rem;
    text-align: center;
    font-weight: 600;
}

.response-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 16px;
}

.response-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    background: white;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    min-height: 50px;
    justify-content: flex-start;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    gap: 12px;
}

.response-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.response-btn:hover::before {
    left: 100%;
}

.response-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.response-btn.selected {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.btn-want {
    border-color: #22c55e;
    color: #22c55e;
}

.btn-want:hover,
.btn-want.selected {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    border-color: #22c55e;
}

.btn-neutral {
    border-color: #f59e0b;
    color: #f59e0b;
}

.btn-neutral:hover,
.btn-neutral.selected {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border-color: #f59e0b;
}

.btn-dont-want {
    border-color: #ef4444;
    color: #ef4444;
}

.btn-dont-want:hover,
.btn-dont-want.selected {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border-color: #ef4444;
}

.btn-icon {
    font-size: 1.5rem;
    margin-bottom: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    flex-shrink: 0;
}

.btn-text {
    font-size: 0.95rem;
    font-weight: 600;
}

/* Comment section - Elegant */
.comment-section {
    margin: 0; /* Removed margin, will be handled by gap */
}

.comment-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
    font-size: 1rem;
}

.comment-section textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 2px solid #e5e7eb;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    border-radius: 8px;
    transition: border-color 0.2s ease;
    background: #fafafa;
}

.comment-section textarea:focus {
    outline: none;
    border-color: #4f46e5;
    background: white;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Additional questions - Clean */
.additional-questions {
    margin: 0;
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
    margin-bottom: 24px;
}

.additional-questions h3 {
    color: #374151;
    margin-bottom: 12px;
    font-size: 1rem;
    font-weight: 600;
}

.question-group {
    margin-bottom: 12px;
}

.question-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
    font-size: 0.9rem;
}

.question-group input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    font-size: 0.9rem;
    border-radius: 6px;
    transition: border-color 0.2s ease;
}

.question-group input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.question-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    font-size: 0.9rem;
    border-radius: 6px;
    transition: border-color 0.2s ease;
    font-family: inherit;
    resize: vertical;
}

.question-group textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Action buttons - Modern */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 16px;
}

.action-btn {
    padding: 10px 16px;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-save {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-save:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

.btn-save-next {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-save-next:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.btn-skip {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #374151;
    border: 2px solid #d1d5db;
}

.btn-skip:hover {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Answered notice */
.answered-notice {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border: 2px solid #86efac;
    color: #166534;
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    margin-top: 20px;
    font-weight: 500;
}

/* Footer - Minimal and elegant */
.footer {
    text-align: center;
    padding: 16px;
    color: #6b7280;
    font-size: 0.875rem;
    border-top: 1px solid #e5e7eb;
    margin-top: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 8px;
}

/* Hidden class for filtering */
.hidden {
    display: none !important;
}

/* Loading state */
.loading {
    text-align: center;
    padding: 40px;
    color: #6b7280;
    font-size: 1.1rem;
}

/* Notification styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 20px;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    max-width: 350px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.notification-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.notification-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.notification-info {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 16px;
        margin: 10px;
        border-radius: 12px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .features-table th,
    .features-table td {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .features-table th:nth-child(3),
    .features-table td:nth-child(3) {
        display: none;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .filter-btn {
        flex: 1;
        min-width: 100px;
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    /* Mobile layout for feature page - single column */
    .feature-main-content {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .feature-right-column {
        /* Removed order: -1 to keep natural order - content first, then buttons */
    }
    
    .response-buttons {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .response-btn {
        min-height: 60px;
        padding: 12px 16px;
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
    }
    
    .btn-icon {
        font-size: 1.5rem;
        margin-bottom: 0;
    }
    
    .btn-text {
        font-size: 0.9rem;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .action-btn {
        min-width: auto;
        width: 100%;
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .feature-content {
        padding: 16px;
    }
    
    .response-section {
        padding: 12px;
    }
    
    .additional-questions {
        padding: 12px;
    }
    
    .comment-section textarea {
        min-height: 60px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 16px;
    }
    
    .header h1 {
        font-size: 1.3rem;
    }
    
    .features-table th,
    .features-table td {
        padding: 6px 8px;
        font-size: 0.75rem;
    }
    
    .feature-title {
        font-size: 0.85rem;
    }
    
    .response-btn {
        padding: 12px 8px;
        min-height: 70px;
    }
    
    .btn-icon {
        font-size: 1.5rem;
    }
    
    .btn-text {
        font-size: 0.9rem;
    }
}

/* Smooth animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-row {
    animation: fadeIn 0.3s ease forwards;
}

/* Profile notification dot */
.profile-notification-dot {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #3730a3 0%, #6b21a8 100%);
}

/* Add suggestion row styling */
.add-suggestion-row {
    cursor: pointer;
    background: #fafafa;
}
.add-suggestion-row:hover {
    background: #f0f7ff;
}
.add-suggestion-row .feature-status {
    font-weight: 700;
}
.add-suggestion-link {
    color: inherit;
    font-weight: 600;
    text-decoration: none;
}
.add-suggestion-link:hover {
    text-decoration: underline;
}

/* Delete button (danger) */
.btn-delete {
    background: #ffffff;
    border: 2px solid #ef4444;
    color: #ef4444;
}
.btn-delete:hover {
    background: #fee2e2;
}

/* My suggestions rows */
.suggestion-row {
    background: rgba(99, 102, 241, 0.03);
}
.suggestion-row:hover {
    background: rgba(99, 102, 241, 0.07);
}

/* Disable row animation on server-rendered index to prevent flicker */
.server-render .feature-row {
    animation: none !important;
}

/* Intro block (informativni uvod iznad liste) */
.intro-block {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
    margin: 8px 0 12px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.intro-block h3 {
    margin-bottom: 6px;
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
}
.intro-block p {
    margin: 4px 0;
    color: #374151;
    font-size: 0.92rem;
    line-height: 1.4;
}
.intro-block .intro-note {
    color: #0f766e;
    background: #ecfeff;
    border: 1px solid #99f6e4;
    border-radius: 8px;
    padding: 6px 8px;
    display: inline-block;
    margin-top: 6px;
}
@media (max-width: 768px) {
    .intro-block { padding: 12px; }
    .intro-block h3 { font-size: 0.95rem; }
    .intro-block p { font-size: 0.9rem; }
}

/* Intro card – aligned with features table */
.intro-block.intro-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.intro-block.intro-card h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
}
.intro-block.intro-card p {
    margin: 6px 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #374151;
}
.intro-block.intro-card .intro-note {
    color: #065f46;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    padding: 6px 8px;
    display: inline-block;
    margin-top: 6px;
}

/* Status compact badges for main table */
.status-compact {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid;
    gap: 3px;
}

.status-compact.status-want {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.status-compact.status-neutral {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.status-compact.status-dont-want {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.status-compact.status-unanswered {
    background: #f1f5f9;
    color: #64748b;
    border-color: #e2e8f0;
}

@media (max-width: 768px) {
    .status-compact {
        font-size: 0.65rem;
        padding: 1px 4px;
        gap: 2px;
    }
}
