/**
 * LC Award Management Frontend Styles
 * Matches the demo UI design for forms and award templates
 */

/* Form Container Styling */
.photography-awards-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* LCAM Award Management Styling */
.lcam-question-label {
    display: block;
    font-weight: 400;
    color: #495057;
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.4;
}

.lcam-question-label.required::after {
    content: " *";
    color: #dc3545;
}

/* Radio Button Options - Clean Checkmark Only Design */
.lcam-simple-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

/* Horizontal layout for specific Yes/No questions */
.lcam-simple-options.horizontal {
    flex-direction: row;
    gap: 2rem;
    align-items: center;
}

.lcam-simple-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1rem;
    color: #495057;
    position: relative;
    padding: 0.5rem 0;
}

/* Hide the actual radio button completely */
.lcam-simple-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
    visibility: hidden;
}

/* Custom checkmark that appears when selected */
.lcam-simple-option .lcam-checkmark {
    margin-right: 0.75rem;
    font-weight: bold;
    color: #28a745;
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    width: 16px;
    text-align: center;
}

/* Show checkmark when radio is selected */
.lcam-simple-option input[type="radio"]:checked + .lcam-checkmark {
    opacity: 1;
}

/* Unaltered Message */
.lcam-unaltered-message {
    margin: 1rem 0;
    padding: 0;
}

.lcam-message-content {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.lcam-message-check {
    color: #495057;
    font-size: 16px;
    font-weight: bold;
    margin-top: 2px;
    flex-shrink: 0;
}

.lcam-message-content strong {
    color: #495057;
    font-weight: 400;
    display: block;
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.lcam-message-content p {
    margin: 0;
    color: #495057;
    font-size: 1rem;
    line-height: 1.4;
}

.lcam-faq-link {
    color: #007bff;
    text-decoration: none;
}

.lcam-faq-link:hover {
    text-decoration: underline;
}

/* Authentication Options - iOS Toggle Style */
.lcam-auth-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.lcam-auth-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem 0;
    font-size: 1rem;
    color: #495057;
}

.lcam-auth-option input[type="radio"] {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

.lcam-ios-toggle {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    background-color: #ccc;
    border-radius: 24px;
    transition: background-color 0.3s;
    cursor: pointer;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.lcam-ios-toggle .slider {
    position: absolute;
    cursor: pointer;
    top: 2px;
    left: 2px;
    background-color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.lcam-auth-option input[type="radio"]:checked ~ .lcam-ios-toggle .slider {
    transform: translateX(18px);
}

.lcam-auth-option input[type="radio"]:checked ~ .lcam-ios-toggle {
    background-color: #007AFF;
}

.lcam-auth-option:has(input[type="radio"]:checked) .lcam-ios-toggle .slider {
    transform: translateX(18px);
}

.lcam-auth-option:has(input[type="radio"]:checked) .lcam-ios-toggle {
    background-color: #007AFF;
}

.lcam-auth-text {
    line-height: 1.4;
}

/* iOS Toggle Switch */
.lcam-ios-toggle {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    background-color: #ccc;
    border-radius: 24px;
    transition: background-color 0.3s;
    cursor: pointer;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.lcam-ios-toggle .slider {
    position: absolute;
    cursor: pointer;
    top: 2px;
    left: 2px;
    background-color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Toggle switch states */
.lcam-auth-option input[type="radio"]:checked ~ .lcam-ios-toggle .slider {
    transform: translateX(18px);
}

.lcam-auth-option input[type="radio"]:checked ~ .lcam-ios-toggle {
    background-color: #007AFF;
}

/* Fix for direct sibling selector */
.lcam-auth-option:has(input[type="radio"]:checked) .lcam-ios-toggle .slider {
    transform: translateX(18px);
}

.lcam-auth-option:has(input[type="radio"]:checked) .lcam-ios-toggle {
    background-color: #007AFF;
}

.photography-awards-form-container h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 1rem;
}

/* Form Group Styling */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group label.required::after {
    content: " *";
    color: #e74c3c;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #fff;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group input.error,
.form-group textarea.error,
.form-group select.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Form Help Text */
.form-help {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* Word Counter */
#bio-word-count,
#word-count {
    font-weight: 600;
    color: #27ae60;
}

#bio-word-count.insufficient-words,
#word-count.insufficient {
    color: #e74c3c;
}

#bio-word-count.excessive-words {
    color: #f39c12;
}

/* Section Headers */
.form-section-header {
    margin: 2rem 0 1rem 0;
}

.form-section-header h3 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin: 0;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

/* REMOVED: Legacy radio button styling that was causing conflicts */

/* Checkbox Styling */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    background: #fff;
}

.checkbox-option:hover {
    border-color: #3498db;
    background: #f8f9fa;
}

.checkbox-option.selected {
    border-color: #27ae60;
    background: #e8f5e8;
    color: #27ae60;
}

.checkbox-option input[type="checkbox"] {
    width: auto;
    margin: 0;
    position: absolute;
    opacity: 0;
}

/* Override radio buttons only within LCAM forms */
.photography-awards-form-container input[type="radio"] {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

/* File Upload Styling */
.file-upload-area {
    border: 2px dashed #bdc3c7;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s;
    cursor: pointer;
}

.file-upload-area:hover,
.file-upload-area.drag-over {
    border-color: #3498db;
    background: #e3f2fd;
}

.upload-placeholder {
    color: #7f8c8d;
}

.upload-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 1rem;
    transition: background 0.3s;
}

.upload-button:hover {
    background: #2980b9;
}

.file-info {
    margin-top: 1rem;
    padding: 1rem;
    background: #e8f5e8;
    border-radius: 6px;
    color: #27ae60;
    font-size: 0.9rem;
}

/* Submit Button */
.submit-button {
    width: 100%;
    padding: 1rem 2rem;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 1rem;
}

.submit-button:hover:not(:disabled) {
    background: #229954;
}

.submit-button:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    margin-top: 1rem;
    color: #7f8c8d;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Messages */
.form-messages {
    margin: 1rem 0;
}

.form-message {
    padding: 1rem;
    border-radius: 6px;
    margin: 0.5rem 0;
}

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

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

.validation-errors {
    margin: 0;
    padding-left: 1.5rem;
}

.validation-errors li {
    margin: 0.25rem 0;
}

/* Admin-specific styling */
#photographer-selection-group {
    background: #f0f8ff;
    border: 2px solid #3498db;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

#photographer-selection-group .form-help {
    color: #2980b9;
    font-style: italic;
    font-weight: 500;
}

/* Social Media Management */
.social-media-entry {
    margin-bottom: 1rem;
}

.social-media-row {
    display: grid;
    grid-template-columns: 200px 1fr auto;
    gap: 1rem;
    align-items: center;
}

.social-platform-select {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
}

.social-platform-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.social-url-input {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.95rem;
}

.social-url-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.remove-social-btn {
    padding: 0.5rem 1rem;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.3s;
}

.remove-social-btn:hover {
    background: #c0392b;
}

.add-social-button {
    padding: 0.75rem 1.5rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    margin-top: 1rem;
    transition: background 0.3s;
}

.add-social-button:hover {
    background: #2980b9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .photography-awards-form-container {
        padding: 1rem;
        margin: 1rem;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .radio-option {
        justify-content: flex-start;
    }
    
    .social-media-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .remove-social-btn {
        justify-self: start;
        width: fit-content;
    }
}

/* Award Template Styling */
.photography-award-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f8f9fa;
}

.award-content-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
}

@media (max-width: 768px) {
    .award-content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.award-title {
    font-size: 2.5rem;
    font-weight: 400;
    color: #2c3e50;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.award-image-container {
    margin: 2rem 0;
}

.award-image-frame {
    background: white;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-radius: 4px;
}

.award-featured-image {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 15px;
}

.photo-caption {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    line-height: 1.4;
}

.exif-info {
    font-weight: 500;
    margin-bottom: 5px;
}

.copyright {
    margin: 5px 0;
}

.award-badge {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-top: 8px;
}

.award-description {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin: 2rem 0;
    line-height: 1.6;
}

.photographer-bio-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin: 2rem 0;
}

.photographer-bio-section h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.photographer-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .photographer-info {
        grid-template-columns: 1fr;
    }
}

.award-sidebar {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: fit-content;
}

.score-section h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.jury-scores,
.resonance-section {
    margin-bottom: 2rem;
}

.score-breakdown {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
}

.score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.score-item:last-child {
    border-bottom: none;
    font-weight: 600;
    background: rgba(52, 152, 219, 0.1);
    margin: 0.5rem -1rem -1rem -1rem;
    padding: 0.75rem 1rem;
}

.score-label {
    color: #2c3e50;
}

.score-value {
    font-weight: 600;
    color: #27ae60;
}

.total-score {
    text-align: center;
    margin: 2rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
}

.total-number {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.total-label {
    font-size: 1.2rem;
    opacity: 0.9;
}

.social-sharing {
    margin: 2rem 0;
}

.social-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.social-btn {
    padding: 0.75rem;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: transform 0.2s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-btn:hover {
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

.social-btn.facebook { background: #1877f2; }
.social-btn.twitter { background: #1da1f2; }
.social-btn.linkedin { background: #0077b5; }

.engagement-metrics {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.metric-label {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.metric-value {
    font-weight: 600;
    color: #2c3e50;
}