
/* Environment: staging - Generated styles */

.debug-info {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 3px;
    z-index: 9999;
}
/**
 * Consistent Category Picker Styles
 * Ensures uniform appearance across submit, create-event, and edit-event pages
 */

/* Base categories container styles */
.categories-container {
    margin: 15px 0;
    position: relative;
}

/* Categories multiselect component (new implementation) */
.categories-multiselect {
    position: relative;
    width: 100%;
}

.selected-categories {
    border: 2px solid #ddd;
    border-radius: 4px;
    padding: 8px;
    min-height: 40px;
    background: white;
    cursor: text;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.selected-categories:focus-within {
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.selected-categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

.selected-category {
    display: inline-flex;
    align-items: center;
    background: #007cba;
    color: white;
    padding: 4px 8px;
    border-radius: 16px;
    font-size: 14px;
    gap: 6px;
    font-weight: 500;
}

.category-name {
    font-weight: 500;
}

.remove-category {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.remove-category:hover {
    background: rgba(255, 255, 255, 0.2);
}

.category-input {
    border: none;
    outline: none;
    padding: 4px;
    font-size: 14px;
    flex: 1;
    min-width: 120px;
    background: transparent;
}

.categories-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
}

.categories-list {
    max-height: 150px;
    overflow-y: auto;
}

.category-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.category-item:hover {
    background: #f8f9fa;
}

.category-item:last-child {
    border-bottom: none;
}

.add-custom-category {
    border-top: 1px solid #e0e0e0;
    padding: 8px;
}

.add-custom-btn {
    width: 100%;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px dashed #ccc;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    transition: all 0.2s;
}

.add-custom-btn:hover {
    background: #e9ecef;
    border-color: #007cba;
    color: #007cba;
}

.plus-icon {
    font-weight: bold;
    font-size: 16px;
}

.custom-text {
    font-weight: 500;
    color: #007cba;
}

/* Fallback checkbox styles (old implementation) */
.categories-container.fallback-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 4px;
    background: #fafafa;
}

.category-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.category-checkbox:hover {
    background-color: #f0f0f0;
    border-color: #007cba;
}

.category-checkbox input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.category-checkbox label {
    margin: 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: normal;
}

/* Page-specific overrides */

/* Submit page styling */
.submit-container .categories-multiselect .selected-categories {
    border-color: #ddd;
    border-width: 2px;
}

.submit-container .categories-multiselect .selected-categories:focus-within {
    border-color: #4b6cb7;
    box-shadow: 0 0 0 3px rgba(75, 108, 183, 0.1);
}

.submit-container .categories-multiselect .selected-category {
    background: #4b6cb7;
}

.submit-container .categories-multiselect .add-custom-btn:hover {
    border-color: #4b6cb7;
    color: #4b6cb7;
}

.submit-container .category-checkbox:hover {
    border-color: #4b6cb7;
}

/* Admin page styling */
.admin-form .categories-multiselect .selected-categories {
    border-color: #dee2e6;
    border-width: 1px;
}

.admin-form .categories-multiselect .selected-categories:focus-within {
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.admin-form .categories-multiselect .selected-category {
    background: #007cba;
}

.admin-form .category-checkbox:hover {
    border-color: #007cba;
}

/* Error states */
.categories-container.error .selected-categories,
.categories-container.error.fallback-categories {
    border-color: #e74c3c;
    background-color: #fdf2f2;
}

.categories-container.error .selected-categories:focus-within {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* Loading states */
.categories-container.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.categories-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 768px) {
    .categories-container.fallback-categories {
        grid-template-columns: 1fr;
    }
    
    .category-checkbox {
        padding: 0.75rem;
    }
    
    .selected-categories {
        padding: 10px;
    }
    
    .category-input {
        min-width: 100px;
    }
}

@media (max-width: 480px) {
    .selected-category {
        font-size: 12px;
        padding: 3px 6px;
    }
    
    .category-item {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .category-checkbox label {
        font-size: 13px;
    }
}

/* Accessibility improvements */
.category-item:focus,
.category-checkbox:focus-within,
.selected-category:focus-within {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.remove-category:focus {
    outline: 2px solid white;
    outline-offset: 1px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .selected-category {
        border: 1px solid currentColor;
    }
    
    .category-item:hover {
        background: #000;
        color: #fff;
    }
    
    .category-checkbox {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .selected-categories,
    .category-item,
    .category-checkbox,
    .remove-category,
    .add-custom-btn {
        transition: none;
    }
    
    .categories-container.loading::after {
        animation: none;
    }
}