/* 
 * UNIVERSAL MODULE DESIGN SYSTEM
 * Consistent UI across all ProductAI modules
 * Mobile-first responsive design
 */

/* === UNIVERSAL MODULE CONTAINER === */
.universal-module {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 4px; /* Reduced from 6px */
    padding: 8px; /* Reduced from 12px */
    margin-bottom: 8px; /* Reduced from 12px */
    box-shadow: 0 1px 3px rgba(0,0,0,0.08); /* Reduced shadow */
    transition: all 0.2s ease;
}

.universal-module:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.1); /* Reduced shadow */
    transform: translateY(-1px);
}

/* === MODULE HEADER === */
.module-header {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e9ecef;
}

.module-header-main {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.module-header-secondary {
    margin-top: 4px;
    width: 100%;
    display: flex;
    align-items: flex-start;
}

.module-title {
    font-size: 13px; /* Reduced from 14px */
    font-weight: 700;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 4px; /* Reduced from 6px */
}

.module-badge {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 2px 6px; /* Reduced from 3px 8px */
    border-radius: 10px;
    font-size: 9px; /* Reduced from 10px */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toggle-button {
    background: #dc3545;
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Consistent module body wrapper */
.module-section {
  padding: 12px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-top: none;
  border-radius: 0 0 12px 12px;
}

.module-subtitle {
  font-weight: 600;
  color: #555;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.toggle-button:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.toggle-button.collapsed {
    background: #007bff;
}

.toggle-button.collapsed:hover {
    background: #0056b3;
}

/* === MODULE HEADER CONTROLS === */
.module-header-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.module-selection-indicator {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
    transition: all 0.2s ease;
    min-width: 120px;
    text-align: center;
    position: relative;
    margin-left: 8px;
}

.module-selection-indicator.none {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    box-shadow: 0 1px 3px rgba(108, 117, 125, 0.25);
}

.module-selection-indicator.ai-choice {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    box-shadow: 0 1px 3px rgba(40, 167, 69, 0.25);
}

.module-selection-indicator.selected {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    box-shadow: 0 1px 3px rgba(40, 167, 69, 0.25);
}

.module-selection-indicator .indicator-check {
    font-size: 13px;
    font-weight: 900;
    margin-right: 4px;
    vertical-align: middle;
    color: #fff;
    text-shadow: 0 1px 2px rgba(30, 126, 52, 0.25);
}

.module-selection-indicator .indicator-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: #fff;
    vertical-align: middle;
    white-space: nowrap;
}

.module-selection-indicator.selected-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(90deg, #f6fff8 0%, #e3f9e5 100%) !important;
    border: 1.5px solid #b7e4c7 !important;
    border-radius: 999px !important;
    box-shadow: 0 2px 8px rgba(33, 136, 56, 0.07) !important;
    padding: 0 10px 0 0 !important;
    min-height: 26px;
    min-width: 0;
    margin-left: 0;
    font-size: 12px;
    font-weight: 600;
    color: #218838 !important;
    transition: all 0.2s;
    position: relative;
    gap: 0;
    max-width: 320px;
    overflow-x: auto;
    white-space: nowrap;
}

.module-selection-indicator.selected-badge .indicator-tab {
    background: #b7e4c7 !important;
    color: #218838 !important;
    font-size: 12px;
    font-weight: 700;
    border-radius: 999px 0 0 999px !important;
    padding: 4px 12px 4px 12px;
    margin-right: 6px;
    letter-spacing: 0.2px;
    box-shadow: none;
    display: inline-block;
    height: 26px;
    display: flex;
    align-items: center;
}

.module-selection-indicator.selected-badge .indicator-label {
    color: #218838 !important;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2px;
    vertical-align: middle;
    white-space: nowrap;
    display: flex;
    align-items: center;
    padding-right: 8px;
}

/* === QUICK SELECTION === */
.quick-selection {
    background: linear-gradient(135deg, #f0f8ff 0%, #e3f2fd 100%);
    border: 1px solid #cce7ff;
    border-radius: 3px; /* Reduced from 4px */
    padding: 6px; /* Reduced from 8px */
    margin-bottom: 8px; /* Reduced from 12px */
}

.quick-selection-title {
    font-size: 10px; /* Reduced from 11px */
    font-weight: 600;
    color: #0d47a1;
    margin-bottom: 4px; /* Reduced from 6px */
    display: flex;
    align-items: center;
    gap: 3px; /* Reduced from 4px */
}

.quick-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 3px; /* Reduced from 4px */
}

.quick-button {
    background: white;
    border: 1px solid #007bff;
    color: #007bff;
    padding: 2px 6px; /* Reduced from 4px 8px */
    border-radius: 10px; /* Reduced from 12px */
    font-size: 8px; /* Reduced from 9px */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-height: 20px; /* Reduced from 24px */
    line-height: 1.1; /* Tighter line height */
}

.quick-button:hover {
    background: #007bff;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,123,255,0.2);
}

.quick-button.selected {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-color: #004085;
    box-shadow: 0 2px 4px rgba(0,123,255,0.3);
}

/* === RADIO BUTTON SECTIONS === */
.module-section {
    margin-bottom: 15px;
}

/* === UNIVERSAL SECTION TOGGLES === */
.section-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px; /* Reduced from 8px 12px */
    margin-bottom: 2px; /* Reduced from 4px */
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 3px; /* Reduced from 4px */
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 11px; /* Reduced from 12px */
    font-weight: 600;
    color: #495057;
    min-height: 30px; /* Reduced from 36px */
}

.section-toggle:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: #007bff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,123,255,0.1);
}

.section-toggle.active {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-color: #004085;
    box-shadow: 0 2px 6px rgba(0,123,255,0.2);
}

.section-toggle.active:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,123,255,0.3);
}

.section-content {
    padding: 6px; /* Significantly reduced from 12px */
    margin-bottom: 4px; /* Reduced from 8px */
    border: 1px solid #e9ecef;
    border-radius: 3px; /* Reduced from 4px */
    background: white;
    display: none;
}

.section-content.expanded {
    display: block;
}

/* === UNIVERSAL RADIO BUTTON GRID === */
.radio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); /* Reduced from 200px */
    gap: 3px; /* Reduced from 8px */
    margin: 0; /* Remove default margin */
}

.radio-grid-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px; /* Reduced from 8px */
    margin: 0; /* Remove default margin */
}

@media (max-width: 768px) {
    .radio-grid {
        grid-template-columns: 1fr;
        gap: 2px; /* Reduced from 6px */
    }
    .radio-grid-two-column {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}

@media (min-width: 1200px) {
    .radio-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); /* Reduced from 180px */
        gap: 4px;
    }
}

/* === UNIVERSAL RADIO OPTION === */
.radio-option {
    display: flex;
    align-items: center; /* Changed from flex-start to center for better alignment */
    padding: 4px 6px; /* Significantly reduced from 8px */
    border: 1px solid #e9ecef; /* Reduced border width from 2px to 1px */
    border-radius: 3px; /* Reduced from 4px */
    background: white;
    cursor: pointer;
    transition: all 0.15s ease; /* Faster transition */
    min-height: 32px; /* Significantly reduced from 48px */
    margin-bottom: 2px; /* Reduced from 4px */
}

.radio-option:hover {
    border-color: #007bff;
    background: #f8f9ff;
    transform: none; /* Remove transform for cleaner look */
    box-shadow: 0 1px 2px rgba(0,123,255,0.1); /* Reduced shadow */
}

.radio-option.selected {
    border-color: #007bff;
    background: linear-gradient(135deg, #e6f3ff 0%, #f0f8ff 100%);
    transform: none; /* Remove transform for cleaner look */
    box-shadow: 0 1px 3px rgba(0,123,255,0.15); /* Reduced shadow */
}

.radio-option input[type="radio"] {
    margin: 0 4px 0 0; /* Reduced from 2px 6px 0 0 */
    transform: scale(0.9); /* Smaller radio button */
    accent-color: #007bff;
    flex-shrink: 0; /* Prevent shrinking */
}

.radio-option-content {
    flex: 1;
    min-width: 0;
    line-height: 1.1; /* Tighter line height */
}

.radio-option-title {
    font-weight: 600;
    color: #333;
    font-size: 10px; /* Reduced from 11px */
    line-height: 1.1; /* Reduced from 1.2 */
    margin-bottom: 0; /* Removed margin */
}

.radio-option.selected .radio-option-title {
    color: #0056b3;
}

.radio-option-description {
    font-size: 8px; /* Reduced from 9px */
    color: #666;
    line-height: 1.1; /* Reduced from 1.2 */
    margin-top: 1px; /* Small margin only if needed */
}

.radio-option.selected .radio-option-description {
    color: #0d47a1;
}

/* === UNIVERSAL PREVIEW SECTION === */
.module-preview {
    padding: 6px; /* Reduced from 8px */
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border: 1px solid #c8e6c9;
    border-radius: 3px; /* Reduced from 4px */
    margin-top: 6px; /* Reduced from 8px */
}

.preview-title {
    font-size: 9px; /* Reduced from 10px */
    color: #2e7d32;
    font-weight: 600;
    margin-bottom: 2px; /* Reduced from 3px */
}

.preview-content {
    font-size: 10px; /* Reduced from 11px */
    color: #1b5e20;
    line-height: 1.1; /* Reduced from 1.2 */
}

/* === STATUS INDICATORS === */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
}

.status-enabled {
    background: #d4edda;
    color: #155724;
}

.status-disabled {
    background: #f8d7da;
    color: #721c24;
}

.status-loading {
    background: #fff3cd;
    color: #856404;
}

/* === MOBILE OPTIMIZATIONS === */
@media (max-width: 576px) {
    .universal-module {
        margin: 6px 0; /* Reduced spacing on mobile */
        padding: 6px; /* More compact on mobile */
    }
    
    .module-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        margin-bottom: 6px;
        padding-bottom: 4px;
    }
    
    .module-title {
        font-size: 12px;
    }
    
    .quick-buttons {
        justify-content: flex-start;
    }
    
    .quick-button {
        padding: 2px 4px;
        font-size: 7px;
        min-height: 18px;
    }
    
    .radio-option {
        padding: 3px 4px;
        min-height: 28px;
    }
    
    .radio-option-title {
        font-size: 9px;
    }
    
    .radio-option-description {
        font-size: 7px;
    }
    
    .section-toggle {
        font-size: 10px;
        padding: 5px 8px;
        min-height: 26px;
    }
    
    .section-content {
        padding: 4px;
    }
}

/* === TABLET OPTIMIZATIONS === */
@media (min-width: 577px) and (max-width: 768px) {
    .radio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2px;
    }
    
    .radio-grid-two-column {
        grid-template-columns: repeat(2, 1fr);
        gap: 2px;
    }
}

/* === ENHANCED ACCESSIBILITY === */
.radio-option:focus-within {
    outline: 2px solid #007bff;
    outline-offset: 1px;
}

.quick-button:focus,
.section-toggle:focus,
.toggle-button:focus {
    outline: 2px solid #007bff;
    outline-offset: 1px;
}

/* === IMPROVED VISUAL HIERARCHY === */
.section-toggle .toggle-icon {
    font-size: 10px;
    transition: transform 0.2s ease;
}

.section-toggle.active .toggle-icon {
    transform: rotate(180deg);
}

/* === BETTER GRID DENSITY === */
@media (min-width: 1400px) {
    .radio-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 3px;
    }
}

/* === ANIMATION UTILITIES === */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { max-height: 0; opacity: 0; }
    to { max-height: 500px; opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.slide-down {
    animation: slideDown 0.3s ease-out;
}

/* === THEME VARIANTS === */
.module-theme-blue .radio-option.selected {
    border-color: #007bff;
    background: linear-gradient(135deg, #e3f2fd 0%, #f0f8ff 100%);
}

.module-theme-green .radio-option.selected {
    border-color: #28a745;
    background: linear-gradient(135deg, #d4edda 0%, #f1f8e9 100%);
}

.module-theme-purple .radio-option.selected {
    border-color: #6f42c1;
    background: linear-gradient(135deg, #e2e3ff 0%, #f3f4ff 100%);
}

/* === LOADING STATES === */
.module-loading {
    opacity: 0.6;
    pointer-events: none;
}

.module-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 #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ✅ MODULE: Every Day Module Styles */
.every-day-module {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    border: none;
}

.every-day-module .module-header h3 {
    color: white;
    margin-bottom: 8px;
    font-size: 1.4em;
    font-weight: 600;
}

.every-day-module .module-description {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
    font-size: 0.95em;
}

.every-day-module .fetch-section {
    margin-bottom: 20px;
}

.every-day-module .fetch-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1em;
}

.every-day-module .fetch-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.every-day-module .fetch-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.every-day-module .loading-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 15px;
}

.every-day-module .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.every-day-module .suggestions-section h4,
.every-day-module .selected-event-details h4 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.2em;
    font-weight: 600;
}

.every-day-module .suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.every-day-module .suggestion-card {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.every-day-module .suggestion-card:hover {
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.every-day-module .suggestion-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    z-index: 10;
}

.every-day-module .suggestion-card input[type="radio"]:checked + .card-label {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
}

.every-day-module .card-label {
    display: block;
    padding: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0;
}

.every-day-module .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 10px;
}

.every-day-module .card-header h5 {
    color: white;
    font-size: 1.1em;
    font-weight: 600;
    margin: 0;
    flex-grow: 1;
}

.every-day-module .event-type {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 500;
    text-transform: capitalize;
    white-space: nowrap;
}

.every-day-module .event-description {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
    font-size: 0.9em;
    line-height: 1.4;
}

.every-day-module .preview-content {
    background: rgba(0, 0, 0, 0.1);
    padding: 12px;
    border-radius: 6px;
    margin-top: 10px;
}

.every-day-module .image-prompt,
.every-day-module .marketing-caption {
    margin-bottom: 8px;
    font-size: 0.85em;
    line-height: 1.3;
}

.every-day-module .image-prompt strong,
.every-day-module .marketing-caption strong {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

.every-day-module .event-summary {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.every-day-module .event-summary h5 {
    color: white;
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 15px;
}

.every-day-module .event-summary p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 12px;
    line-height: 1.5;
}

.every-day-module .event-summary strong {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

.every-day-module .error-message {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.every-day-module .error-message p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-size: 0.95em;
}

/* ✅ MODULE: Special Day Integration in Background Module */
.special-day-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 10px 0;
    color: white;
}

.special-day-fetch-section {
    margin-bottom: 20px;
}

.special-day-fetch-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    font-size: 14px;
}

.special-day-fetch-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.special-day-fetch-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.special-day-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: white;
    opacity: 0.9;
    padding: 15px;
}

.special-day-loading .loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.special-day-options-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 15px;
    color: white;
    text-align: center;
}

.special-day-option {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: block;
}

.special-day-option:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.special-day-option.selected,
.special-day-option:has(input:checked) {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.special-day-option input[type="radio"] {
    display: none;
}

.special-day-option .radio-option-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 8px;
    color: white;
}

.special-day-option .radio-option-description {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 8px;
    line-height: 1.4;
    color: white;
}

.special-day-option .radio-option-caption {
    font-size: 12px;
    font-style: italic;
    opacity: 0.8;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 8px;
    margin-top: 8px;
    color: white;
}

.special-day-error {
    text-align: center;
    color: white;
    opacity: 0.9;
    padding: 20px;
}

.special-day-error .error-icon {
    font-size: 24px;
    margin-bottom: 10px;
}

.special-day-error .error-message {
    margin-bottom: 15px;
    font-size: 14px;
}

.special-day-error .retry-button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
}

.special-day-error .retry-button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.radio-grid-single-column {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 0;
}

/* === CREATIVE THEMES MODULE === */
.creative-themes-module .theme-categories {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.creative-themes-module .theme-category {
    border: 1px solid #e9ecef;
    border-radius: 4px;
    background: white;
}

.creative-themes-module .category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
    color: #495057;
}

.creative-themes-module .category-icon {
    font-size: 16px;
}

.creative-themes-module .theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    padding: 12px;
}

.creative-themes-module .theme-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
}

.creative-themes-module .theme-card:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,123,255,0.15);
}

.creative-themes-module .theme-card.selected {
    border-color: #007bff;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    box-shadow: 0 4px 12px rgba(0,123,255,0.2);
}

.creative-themes-module .theme-card.popular::before {
    content: "🔥";
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff6b6b;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    z-index: 1;
}

.creative-themes-module .theme-thumbnail {
    width: 60px;
    height: 60px;
    margin: 0 auto 8px;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.creative-themes-module .theme-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.creative-themes-module .theme-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.creative-themes-module .theme-card:hover .theme-overlay {
    opacity: 1;
}

.creative-themes-module .theme-icon {
    font-size: 24px;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.creative-themes-module .theme-label {
    font-size: 11px;
    font-weight: 600;
    color: #495057;
    line-height: 1.2;
}

.creative-themes-module .theme-card.selected .theme-label {
    color: #007bff;
}

.creative-themes-module .popular-badge {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 4px;
}

.creative-themes-module .selected-theme-info {
    margin-top: 16px;
    padding: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.creative-themes-module .theme-preview {
    display: flex;
    align-items: center;
    gap: 12px;
}

.creative-themes-module .theme-preview-image {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

.creative-themes-module .theme-details h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.creative-themes-module .theme-details p {
    margin: 0;
    font-size: 12px;
    color: #666;
    line-height: 1.3;
}

/* Special Day Themes in Creative Themes Module */
.creative-themes-module .special-day-theme {
    border-color: #ffc107;
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
}

.creative-themes-module .special-day-theme:hover {
    border-color: #ff9800;
    background: linear-gradient(135deg, #ffecb3 0%, #ffcc02 100%);
}

.creative-themes-module .special-day-theme.selected {
    border-color: #ff9800;
    background: linear-gradient(135deg, #ffcc02 0%, #ff9800 100%);
    color: white;
}

.creative-themes-module .special-day-theme .theme-label {
    color: #e65100;
}

.creative-themes-module .special-day-theme.selected .theme-label {
    color: white;
}

.creative-themes-module .special-day-theme .theme-description {
    font-size: 10px;
    color: #bf360c;
    margin-top: 4px;
}

.creative-themes-module .special-day-theme.selected .theme-description {
    color: rgba(255,255,255,0.9);
}

.creative-themes-module .special-day-theme .theme-caption {
    font-size: 9px;
    color: #8d6e63;
    margin-top: 2px;
    font-style: italic;
}

.creative-themes-module .special-day-theme.selected .theme-caption {
    color: rgba(255,255,255,0.8);
}

.creative-themes-module .special-day-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

/* Mobile responsiveness for Creative Themes */
@media (max-width: 768px) {
    .creative-themes-module .theme-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 6px;
        padding: 8px;
    }
    
    .creative-themes-module .theme-thumbnail {
        width: 50px;
        height: 50px;
    }
    
    .creative-themes-module .theme-label {
        font-size: 10px;
    }
    
    .creative-themes-module .special-day-grid {
        grid-template-columns: 1fr;
    }
}

/* === OBJECT SELECTION MODULE === */
.object-selection-module .unified-objects-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.object-selection-module .object-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
}

.object-selection-module .object-option:hover {
    background: #f8f9fa;
    border-color: #007bff;
    transform: translateY(-1px);
}

.object-selection-module .object-option input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.object-selection-module .object-option .object-name {
    color: #333;
    font-weight: 500;
    user-select: none;
}

.object-selection-module .object-option:has(input:checked) {
    background: linear-gradient(135deg, #e3f2fd 0%, #f0f8ff 100%);
    border-color: #007bff;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.1);
}

.object-selection-module .object-option:has(input:checked) .object-name {
    color: #0d47a1;
    font-weight: 600;
}

/* Selected objects display */
.object-selection-module .selected-objects-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 20px;
}

.object-selection-module .selected-object-item {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.object-selection-module .no-selection {
    color: #6c757d;
    font-style: italic;
    font-size: 12px;
}

/* Analysis controls */
.object-selection-module .analysis-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.object-selection-module .analysis-button {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.object-selection-module .analysis-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.object-selection-module .analysis-button:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.object-selection-module .analysis-status .status-loading {
    color: #17a2b8;
    font-size: 12px;
}

.object-selection-module .analysis-status .status-success {
    color: #28a745;
    font-size: 12px;
    font-weight: 500;
}

.object-selection-module .analysis-status .status-error {
    color: #dc3545;
    font-size: 12px;
    font-weight: 500;
} 

/* ========================================================================
   🏢 BRAND SETTINGS MODULE STYLES
   ======================================================================== */

.brand-setting-section {
    margin-bottom: 20px;
}

.brand-setting-section:last-child {
    margin-bottom: 0;
}

.brand-watermark-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

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

.brand-position-options {
    display: flex;
    gap: 15px;
    margin-top: 8px;
}

.universal-radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid transparent;
}

.universal-radio-option:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.2);
}

.universal-radio-option input[type="radio"] {
    margin: 0;
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color, #667eea);
}

.universal-radio-option .radio-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary, #2d3748);
}

/* Brand Logo Upload Styles */
.brand-logo-upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.5);
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo-upload-area:hover {
    border-color: var(--primary-color, #667eea);
    background: rgba(102, 126, 234, 0.05);
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.upload-icon {
    font-size: 24px;
    opacity: 0.6;
}

.upload-text {
    font-size: 13px;
    color: var(--text-secondary, #64748b);
    font-weight: 500;
}

.logo-preview-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.logo-preview-image {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
}

.logo-info {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-file-name {
    font-size: 12px;
    color: var(--text-primary, #2d3748);
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.remove-logo-btn {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.remove-logo-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Brand Cost Information */
.brand-cost-info {
    margin-top: 15px;
    padding: 12px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 6px;
    border-left: 3px solid var(--primary-color, #667eea);
}

.cost-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cost-icon {
    font-size: 14px;
}

.cost-text {
    font-size: 12px;
    color: var(--text-secondary, #64748b);
    font-weight: 500;
}

/* Subscription Badge Styles */
.subscription-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .brand-position-options {
        flex-direction: column;
        gap: 10px;
    }
    
    .universal-radio-option {
        justify-content: flex-start;
    }
    
    .logo-file-name {
        max-width: 80px;
    }
    
    .brand-logo-upload-area {
        padding: 15px;
        min-height: 80px;
    }
}

/* Brand Position Section */
.brand-position-section {
    margin-top: 15px;
}

/* Brand Watermark Upload Styles */
.brand-watermark-upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.5);
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.brand-watermark-upload-area:hover {
    border-color: var(--primary-color, #667eea);
    background: rgba(102, 126, 234, 0.05);
}

.watermark-preview-container {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.watermark-preview-image {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
}

.watermark-info {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.watermark-file-name {
    font-size: 11px;
    color: var(--text-primary, #2d3748);
    font-weight: 500;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.remove-watermark-btn {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 4px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 10px;
    transition: all 0.2s ease;
}

.remove-watermark-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Watermark Text Section */
.watermark-text-section {
    margin-top: 10px;
}

/* Design Number Input */
.design-number-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    font-family: 'Courier New', monospace;
}

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

/* Description Textarea */
.description-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    resize: vertical;
    min-height: 80px;
}

.description-textarea:focus {
    outline: none;
    border-color: var(--primary-color, #667eea);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Character Counter */
.character-counter {
    display: flex;
    justify-content: flex-end;
    margin-top: 5px;
}

.character-counter span {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
}

/* Module Actions Layout */
.universal-module-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.universal-module-toggle {
    font-size: 12px;
    color: var(--text-secondary, #64748b);
    transition: transform 0.3s ease;
}

.universal-module-container.expanded .universal-module-toggle {
    transform: rotate(180deg);
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .brand-watermark-input,
    .design-number-input,
    .description-textarea {
        background: rgba(31, 41, 55, 0.9);
        border-color: #374151;
        color: #f9fafb;
    }
    
    .universal-radio-option {
        background: rgba(31, 41, 55, 0.5);
    }
    
    .universal-radio-option:hover {
        background: rgba(102, 126, 234, 0.2);
    }
    
    .brand-logo-upload-area,
    .brand-watermark-upload-area {
        background: rgba(31, 41, 55, 0.5);
        border-color: #374151;
    }
    
    .logo-preview-container,
    .watermark-preview-container {
        background: rgba(31, 41, 55, 0.9);
        border-color: #374151;
    }
    
    .brand-cost-info {
        background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    }
}

/* 🎬 SCENE SELECTION MODULE SPECIFIC STYLES */
.scene-selection-module .quick-select-section {
    margin-bottom: 20px;
}

.scene-selection-module .quick-select-header {
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.scene-selection-module .quick-select-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.scene-selection-module .quick-select-btn {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.scene-selection-module .quick-select-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.4);
}

.scene-selection-module .scene-categories-section {
    margin-bottom: 20px;
}

.scene-selection-module .section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.scene-selection-module .section-icon {
    font-size: 16px;
}

.scene-selection-module .section-title {
    font-size: 13px;
    font-weight: 600;
    color: #495057;
}

.scene-selection-module .scene-category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.scene-selection-module .scene-category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    border: 2px solid #e3f2fd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.scene-selection-module .scene-category-card:hover {
    border-color: #2196F3;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
}

.scene-selection-module .scene-category-card.selected {
    border-color: #4CAF50;
    background: #f1f8e9;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.scene-selection-module .category-icon {
    font-size: 20px;
    margin-bottom: 6px;
}

.scene-selection-module .category-name {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin-bottom: 2px;
}

.scene-selection-module .category-description {
    font-size: 11px;
    color: #666;
    line-height: 1.2;
}

.scene-selection-module .scene-option-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.scene-selection-module .scene-option {
    margin-bottom: 8px;
}

.scene-selection-module .scene-option.selected {
    border-color: #4CAF50;
    background: #f1f8e9;
}

.scene-selection-module .scene-option.selected .radio-option-content {
    background: #f1f8e9;
} 