/* Survey Core CSS - Shared between Detail and List views */

/* --- Card & Container --- */
.survey-card,
.survey-feed-card,
.survey-container {
    background: white;
    border-radius: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid #f1f5f9;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.survey-feed-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
}

.survey-container {
    padding: 40px;
}

@media (max-width: 768px) {
    .survey-container {
        padding: 25px 20px;
        border-radius: 16px;
    }
}

/* --- Questions --- */
.question-block {
    margin-bottom: 40px;
}

.question-block h3,
.question-block h4 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1e293b;
}

/* --- Options Grid --- */
.options-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.image-poll-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

@media (max-width: 600px) {
    .image-poll-grid {
        grid-template-columns: 1fr !important;
    }
}

/* --- Option Card --- */
.option-card {
    background: #f8fafc;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 14px 18px;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    gap: 15px;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.option-card:hover {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

/* For image polls within grid, adjust layout */
.image-poll-grid .option-card {
    flex-direction: column !important;
    padding-top: 0;
    align-items: flex-start;
}

/* --- Option Content --- */
.option-content {
    font-weight: 500;
    color: #334155;
    font-size: 1rem;
    z-index: 2;
    flex: 1;
}

.option-check {
    width: 24px;
    height: 24px;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    z-index: 2;
    transition: all 0.2s;
    color: var(--primary);
    flex-shrink: 0;
}

.option-check i {
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s;
}

.option-card:hover .option-check {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.option-card:hover .option-check i {
    opacity: 1;
    transform: scale(1);
}

/* --- Images in Options --- */
.poll-image-container {
    width: 100%;
    background: #f1f5f9;
    margin-bottom: 10px;
    border-radius: 8px;
    /* For result inside card */
    overflow: hidden;
    position: relative;
}

.image-poll-grid .poll-image-container {
    border-radius: 12px 12px 0 0;
    margin: 0 calc(-1 * 18px) 15px calc(-1 * 18px);
    width: calc(100% + 36px);
    height: 200px;
}

.poll-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- Results --- */
.voted-badge {
    background: #ecfdf5;
    color: #059669;
    padding: 10px 20px;
    border-radius: 99px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

/* Result Bar Animation */
.result-fill {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.1) 0%, rgba(99, 102, 241, 0.25) 50%, rgba(99, 102, 241, 0.1) 100%);
    background-size: 200% 100%;
    animation: liquidFlow 3s infinite linear;
    transition: width 1s ease;
    z-index: 0;
    border-radius: 12px;
}

@keyframes liquidFlow {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: -100% 0;
    }
}

.result-item.winner .result-fill {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.25) 50%, rgba(16, 185, 129, 0.1) 100%);
    background-size: 200% 100%;
}

/* Overlay for images */
.result-fill-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 6px;
    background: #22c55e;
    transition: width 1s ease;
}

.result-percent-badge {
    font-weight: 800;
    color: var(--primary);
    z-index: 2;
}

.result-item.winner .result-percent-badge {
    color: #059669;
}

/* Result Item specific spacing overrides */
.result-item {
    cursor: default !important;
}

.result-item:hover {
    transform: none;
    box-shadow: none;
    border-color: transparent;
}