/**
 * Schedule Poll Styles
 * CSS for the group schedule selection interface
 */

.wcvi-schedule-poll {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header Styles */
.wcvi-poll-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
}

.wcvi-poll-header h2 {
    margin: 0 0 10px 0;
    font-size: 1.8em;
}

.wcvi-poll-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 1.1em;
}

/* Poll Stats */
.wcvi-poll-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    flex-wrap: wrap;
    gap: 15px;
}

.wcvi-selection-progress {
    flex: 1;
    min-width: 200px;
}

.wcvi-selection-count {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.wcvi-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.wcvi-progress-fill {
    height: 100%;
    background: #4CAF50;
    transition: width 0.3s ease;
}

.wcvi-countdown {
    text-align: right;
}

.wcvi-countdown-label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.wcvi-countdown-time {
    font-size: 1.2em;
    font-weight: 700;
    color: #FFE082;
}

/* Time Slots Grid */
.wcvi-time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.wcvi-time-slot {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.wcvi-time-slot:hover,
.wcvi-slot-hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.wcvi-time-slot.wcvi-slot-selected {
    border-color: #667eea;
    background-color: #f8f9ff;
}

.wcvi-time-slot.wcvi-top-choice {
    border-color: #4CAF50;
    background-color: #f1f8e9;
}

.wcvi-slot-label {
    display: block;
    cursor: pointer;
    margin: 0;
}

.wcvi-slot-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.wcvi-slot-content {
    padding: 20px;
}

.wcvi-slot-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.wcvi-slot-time {
    flex: 1;
}

.wcvi-slot-date {
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.wcvi-slot-time-range {
    font-size: 1em;
    color: #666;
    margin-bottom: 5px;
}

.wcvi-slot-label-text {
    font-size: 0.9em;
    color: #888;
    font-style: italic;
}

.wcvi-top-badge {
    background: #4CAF50;
    color: white;
    padding: 4px 8px;
    border-radius: 16px;
    font-size: 0.8em;
    font-weight: 600;
    white-space: nowrap;
}

/* Selection Statistics */
.wcvi-selection-stats {
    margin-top: 15px;
}

.wcvi-selection-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.wcvi-selection-count {
    font-weight: 600;
    color: #333;
}

.wcvi-selection-percentage {
    color: #666;
    font-size: 0.9em;
}

.wcvi-selection-bar {
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.wcvi-selection-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

.wcvi-selectionrs-list {
    font-size: 0.85em;
    color: #666;
    font-style: italic;
}

/* Comment Section */
.wcvi-comment-section {
    margin-bottom: 30px;
}

.wcvi-comment-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.wcvi-comment-section textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.wcvi-comment-section textarea:focus {
    outline: none;
    border-color: #667eea;
}

/* Selection Actions */
.wcvi-selection-actions {
    text-align: center;
}

.wcvi-selection-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.wcvi-selection-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.wcvi-selection-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Selected State Styles */
.wcvi-selectiond-state .wcvi-poll-header {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.wcvi-user-selection {
    background: #f1f8e9;
    border: 2px solid #4CAF50;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.wcvi-user-selection h3 {
    margin: 0 0 15px 0;
    color: #2e7d32;
}

.wcvi-selected-slot {
    background: white;
    padding: 15px;
    border-radius: 8px;
}

.wcvi-slot-info {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 10px;
    color:#000;
}

.wcvi-user-comment {
    font-style: italic;
    color: #666;
    margin-top: 10px;
}

/* Results Summary */
.wcvi-results-summary {
    margin-top: 30px;
}

.wcvi-results-summary h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.wcvi-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.wcvi-result-slot {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background: white;
}

.wcvi-result-slot.wcvi-user-choice {
    border-color: #4CAF50;
    background: #f1f8e9;
}

.wcvi-your-choice {
    color: #4CAF50;
    font-weight: 600;
    font-size: 0.9em;
    margin-top: 5px;
}

.wcvi-selection-summary {
    margin-top: 15px;
}

/* Messages */
.wcvi-message {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
}

.wcvi-message.wcvi-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.wcvi-message.wcvi-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Error States */
.wcvi-poll-error {
    text-align: center;
    padding: 40px 20px;
    background: #f8d7da;
    border: 2px solid #f5c6cb;
    border-radius: 12px;
    color: #721c24;
}

.wcvi-poll-error h3 {
    margin: 0 0 15px 0;
    font-size: 1.5em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wcvi-schedule-poll {
        padding: 15px;
    }
    
    .wcvi-poll-stats {
        flex-direction: column;
        text-align: center;
    }
    
    .wcvi-countdown {
        text-align: center;
    }
    
    .wcvi-time-slots {
        grid-template-columns: 1fr;
    }
    
    .wcvi-slot-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .wcvi-top-badge {
        align-self: flex-start;
    }
}

/* Enhanced Poll Info Styles */
.wcvi-poll-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 15px 0;
    text-align: left;
}

.wcvi-agenda-info h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    padding: 12px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.wcvi-invite-stats {
    display: flex;
    align-items: center;
}

.wcvi-invite-stats p {
    margin: 0;
    background: rgba(255, 255, 255, 0.2);
    padding: 12px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    width: 100%;
    font-size: 1rem;
}

/* Custom Date/Time Suggestion Styles */
.wcvi-custom-suggestion {
    margin-top: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px dashed #dee2e6;
}

.wcvi-custom-suggestion h3 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 1.2rem;
}

.wcvi-custom-suggestion p {
    margin: 0 0 15px 0;
    color: #6c757d;
}

.wcvi-custom-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 15px 0;
}

.wcvi-input-group {
    display: flex;
    flex-direction: column;
}

.wcvi-input-group label {
    margin-bottom: 5px;
    font-weight: 500;
    color: #495057;
}

.wcvi-input-group input {
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.wcvi-input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.wcvi-custom-note {
    font-size: 0.9rem;
    color: #6c757d;
    font-style: italic;
    margin-top: 10px;
}

/* Selected State Enhancements */
.wcvi-custom-suggestion {
    margin-top: 10px;
    padding: 8px 12px;
    background: #e7f3ff;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #0056b3;
}

/* Responsive for custom inputs */
@media (max-width: 768px) {
    .wcvi-poll-info {
        grid-template-columns: 1fr;
    }
    
    .wcvi-custom-inputs {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}
