/* 
 * QUAL-IT Weekly Poll Styles
 * Styles for the weekly poll feature
 */

/* ===== POLL CONTAINER ===== */
.poll-container {
    background: linear-gradient(145deg, #3c3c56, #474766);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    padding: 2em;
    margin-bottom: 2em;
    position: relative;
    overflow: hidden;
}

.poll-container::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(140, 201, 240, 0.15) 0%, rgba(140, 201, 240, 0) 70%);
    border-radius: 0 0 0 100%;
    z-index: 0;
}

/* ===== POLL HEADER ===== */
.poll-header {
    margin-bottom: 1.5em;
    position: relative;
    z-index: 1;
}

.poll-title {
    font-size: 1.6em;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5em;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.poll-title i {
    font-size: 0.9em;
    color: #8cc9f0;
}

.poll-subtitle {
    font-size: 1em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0;
}

/* ===== POLL QUESTION ===== */
.poll-question {
    font-size: 1.3em;
    font-weight: 600;
    color: #fff;
    margin-bottom: 1.5em;
    position: relative;
    z-index: 1;
}

/* ===== POLL OPTIONS ===== */
.poll-options {
    display: flex;
    flex-direction: column;
    gap: 0.8em;
    margin-bottom: 1.5em;
    position: relative;
    z-index: 1;
}

.poll-option {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1em;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.poll-option:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.poll-option.selected {
    background: rgba(140, 201, 240, 0.15);
    border-color: rgba(140, 201, 240, 0.4);
}

.poll-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.poll-option-label {
    display: flex;
    align-items: center;
    color: #fff;
    font-weight: 500;
    padding-left: 2.2em;
    position: relative;
}

.poll-option-label::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1.2em;
    height: 1.2em;
    border: 2px solid rgba(140, 201, 240, 0.5);
    border-radius: 50%;
    transition: all 0.2s ease;
}

.poll-option.selected .poll-option-label::before {
    border-color: #8cc9f0;
    background-color: rgba(140, 201, 240, 0.2);
}

.poll-option.selected .poll-option-label::after {
    content: "";
    position: absolute;
    left: 0.4em;
    top: 50%;
    transform: translateY(-50%);
    width: 0.5em;
    height: 0.5em;
    background-color: #8cc9f0;
    border-radius: 50%;
}

/* ===== POLL RESULTS ===== */
.poll-results {
    display: none;
    margin-top: 1.5em;
}

.poll-results.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.result-bar {
    background: rgba(255, 255, 255, 0.07);
    border-radius: 6px;
    height: 2.2em;
    margin-bottom: 1em;
    position: relative;
    overflow: hidden;
}

.result-fill {
    background: linear-gradient(90deg, #8cc9f0, #a66f9e);
    height: 100%;
    border-radius: 6px;
    transition: width 1s cubic-bezier(0.17, 0.67, 0.83, 0.67);
    position: relative;
}

.result-label {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1em;
    font-size: 0.9em;
    color: #fff;
    font-weight: 500;
    box-sizing: border-box;
}

.result-percentage {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
}

/* ===== POLL ACTIONS ===== */
.poll-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5em;
    position: relative;
    z-index: 1;
}

.poll-submit-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.7em 1.5em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.poll-submit-btn:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.poll-submit-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
    transform: none;
}

.poll-results-toggle {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9em;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s ease;
    padding: 0.5em;
}

.poll-results-toggle:hover {
    color: #fff;
}

.poll-message {
    text-align: center;
    padding: 1em;
    background: rgba(62, 207, 142, 0.1);
    border: 1px solid rgba(62, 207, 142, 0.3);
    border-radius: 8px;
    color: #fff;
    display: none;
}

.poll-message.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 600px) {
    .poll-container {
        padding: 1.5em;
    }
    
    .poll-title {
        font-size: 1.4em;
    }
    
    .poll-question {
        font-size: 1.1em;
    }
} 