/* CFAC Voting Frontend Styles */
.cfac-voting-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.cfac-voting-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #FF7043 0%, #020101 100%);
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.cfac-poll-title {
    margin: 0 0 10px 0;
    font-size: 2em;
    font-weight: 700;
}

.cfac-poll-description {
    margin: 0;
    font-size: 1.1em;
    opacity: 0.9;
}

/* Stemmeseddel styling */
.cfac-ballot-paper {
    background: #fff;
    border: 3px solid #020101;
    border-radius: 0;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    position: relative;
    background-image: 
        linear-gradient(to right, #ddd 1px, transparent 1px),
        linear-gradient(to bottom, #f9f9f9 0%, #fff 100%);
}

.cfac-ballot-paper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 10px;
    background: repeating-linear-gradient(
        90deg,
        #020101 0px,
        #020101 20px,
        transparent 20px,
        transparent 40px
    );
}

.cfac-ballot-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #020101;
}

.cfac-ballot-header h3 {
    margin: 0 0 10px 0;
    font-size: 1.8em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #020101;
}

.cfac-ballot-header p {
    margin: 0;
    font-size: 1.1em;
    color: #666;
    font-style: italic;
}

/* Valgmuligheder */
.cfac-options {
    margin: 30px 0;
}

.cfac-option {
    margin-bottom: 25px;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: #fafafa;
}

.cfac-option:hover {
    border-color: #FF7043;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 112, 67, 0.2);
    background: #fff;
}

.cfac-option.selected {
    border-color: #FF7043;
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 112, 67, 0.2);
}

.cfac-option.focused {
    outline: 2px solid #FF7043;
    outline-offset: 2px;
}

.cfac-option-label {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    cursor: pointer;
    width: 100%;
    margin: 0;
}

.cfac-radio {
    display: none;
}

/* Custom checkbox styling */
.cfac-checkbox {
    width: 24px;
    height: 24px;
    border: 3px solid #020101;
    margin-right: 15px;
    margin-top: 2px;
    position: relative;
    flex-shrink: 0;
    background: white;
    transition: all 0.3s ease;
}

.cfac-radio:checked + .cfac-checkbox {
    background: #020101;
}

.cfac-radio:checked + .cfac-checkbox::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 16px;
    font-weight: bold;
}

.cfac-option-content {
    flex: 1;
}

.cfac-option-title {
    font-size: 1.3em;
    font-weight: 700;
    margin-bottom: 8px;
    color: #020101;
    line-height: 1.3;
}

.cfac-option-subtitle {
    font-size: 1.05em;
    color: #666;
    margin-bottom: 6px;
    line-height: 1.4;
}

.cfac-option-subsubtitle {
    font-size: 0.95em;
    color: #999;
    font-style: italic;
    line-height: 1.4;
}

/* Vælger info */
.cfac-voter-info {
    margin: 30px 0;
    padding: 25px;
    background: #f8f9fa;
    border: 2px dashed #ccc;
    border-radius: 8px;
}

.cfac-voter-info h4 {
    margin: 0 0 15px 0;
    font-size: 1.2em;
    color: #020101;
    text-align: center;
}

.cfac-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    margin-bottom: 15px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.cfac-input:focus {
    outline: none;
    border-color: #FF7043;
    box-shadow: 0 0 0 3px rgba(255, 112, 67, 0.1);
}

.cfac-input.valid {
    border-color: #46b450;
}

.cfac-input.error {
    border-color: #dc3232;
}

.cfac-input.required-field {
    border-color: #FF7043;
    background-color: #fff8f6;
}

.cfac-input.required-field:focus {
    border-color: #FF7043;
    box-shadow: 0 0 0 3px rgba(255, 112, 67, 0.2);
}

.cfac-input:last-child {
    margin-bottom: 0;
}

/* Submit sektion */
.cfac-submit-section {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #020101;
}

.cfac-submit-btn {
    background: linear-gradient(135deg, #FF7043 0%, #020101 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2em;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 200px;
}

.cfac-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 112, 67, 0.4);
}

.cfac-submit-btn:disabled,
.cfac-submit-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Beskeder */
.cfac-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    font-weight: 600;
    text-align: center;
}

.cfac-message.success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.cfac-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

/* Thank you message */
.cfac-thank-you {
    display: none;
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #FF7043 0%, #020101 100%);
    color: white;
    border-radius: 10px;
    margin-top: 30px;
    position: relative;
    overflow: hidden;
}

.cfac-thank-you h2 {
    font-size: 2.5em;
    margin: 0 0 15px 0;
}

.cfac-thank-you p {
    font-size: 1.2em;
    margin: 0;
    opacity: 0.9;
}

.cfac-confetti {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    pointer-events: none;
}

.cfac-confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #FF7043;
    top: -10px;
    opacity: 1;
}

.cfac-confetti-piece:nth-child(1) { left: 10%; background: #FF7043; }
.cfac-confetti-piece:nth-child(2) { left: 30%; background: #020101; }
.cfac-confetti-piece:nth-child(3) { left: 50%; background: #FF7043; }
.cfac-confetti-piece:nth-child(4) { left: 70%; background: #020101; }
.cfac-confetti-piece:nth-child(5) { left: 90%; background: #FF7043; }

/* Animations */
@keyframes cfac-ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .cfac-voting-container {
        padding: 15px;
    }
    
    .cfac-ballot-paper {
        padding: 20px;
        margin: 15px 0;
    }
    
    .cfac-poll-title {
        font-size: 1.6em;
    }
    
    .cfac-option-label {
        padding: 15px;
    }
    
    .cfac-option-title {
        font-size: 1.2em;
    }
    
    .cfac-option-subtitle {
        font-size: 1em;
    }
    
    .cfac-option-subsubtitle {
        font-size: 0.9em;
    }
    
    .cfac-checkbox {
        width: 20px;
        height: 20px;
        margin-right: 12px;
    }
    
    .cfac-radio:checked + .cfac-checkbox::after {
        font-size: 14px;
    }
    
    .cfac-submit-btn {
        padding: 12px 30px;
        font-size: 1.1em;
        min-width: 180px;
    }
}

@media (max-width: 480px) {
    .cfac-voting-container {
        padding: 10px;
    }
    
    .cfac-ballot-paper {
        padding: 15px;
    }
    
    .cfac-voting-header {
        padding: 15px;
    }
    
    .cfac-poll-title {
        font-size: 1.4em;
    }
    
    .cfac-poll-description {
        font-size: 1em;
    }
    
    .cfac-option-label {
        padding: 12px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cfac-checkbox {
        margin-bottom: 10px;
        margin-right: 0;
    }
    
    .cfac-submit-btn {
        width: 100%;
        padding: 15px;
    }
}

/* Loading animation */
.cfac-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Print styles */
@media print {
    .cfac-voting-container {
        max-width: none;
        margin: 0;
        padding: 0;
    }
    
    .cfac-ballot-paper {
        box-shadow: none;
        border: 2px solid #000;
    }
    
    .cfac-submit-section {
        display: none;
    }
    
    .cfac-voter-info {
        border: 1px solid #000;
        background: transparent;
    }
}