/**
 * Enhanced Preset System Styles
 * 
 * Styles for the new preset system UI components including
 * style selection, entry selection, and enhanced interactions.
 */

/* ===== STYLE SELECTION STYLES ===== */

.style-selection-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.style-selection-title {
    color: #4ecdc4;
    margin-bottom: 20px;
    font-size: 1.3rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;

.style-selection-title::before {
    content: "🎨";
    margin-right: 10px;
    font-size: 1.5rem;

.style-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;

.style-selection-button {
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    color: #e0e0e0;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 80px;

.style-selection-button:hover {
    border-color: #4ecdc4;
    background: rgba(78, 205, 196, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(78, 205, 196, 0.2);

.style-selection-button:focus {
    outline: 2px solid #4ecdc4;
    outline-offset: 2px;

.style-selection-button.selected {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
    font-weight: bold;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.3);

.style-selection-button.selected::after {
    content: "✓";
    margin-left: 10px;
    font-size: 1.2rem;

/* Style tooltip */
.style-tooltip {
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    max-width: 250px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1000;

.style-tooltip.visible {
    opacity: 1;

.style-tooltip::before {
    content: "";
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid rgba(0, 0, 0, 0.9);

/* Style selection feedback */
.style-selection-feedback {
    padding: 12px 16px;
    border-radius: 10px;
    margin-top: 15px;
    animation: slideInFromTop 0.4s ease;

.style-selection-feedback.success {
    border: 1px solid #4ecdc4;

.style-selection-feedback .feedback-icon {
    font-size: 1.1rem;

/* Loading and error states */
.style-loading,
.style-error {
    padding: 40px 20px;
    color: #b0b0b0;

    background: rgba(255, 107, 107, 0.05);
    border: 1px solid rgba(255, 107, 107, 0.2);
    margin: 20px 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;

/* Enhanced error UI components */
.style-error .error-header {
    gap: 12px;

.style-error .error-icon {
    font-size: 2rem;
    opacity: 0.8;

.style-error .error-title {
    margin: 0;
    font-weight: 600;

.style-error .error-content {
    margin-bottom: 25px;

.style-error .error-message {
    color: #ff8e8e;
    line-height: 1.5;
    margin-bottom: 10px;

.style-error .error-hint {
    color: #ffb3b3;
    font-style: italic;

.style-error .error-actions {
    flex-wrap: wrap;

.style-error .error-details {
    border-top: 1px solid rgba(255, 107, 107, 0.2);
    padding-top: 15px;

.style-error .error-details small {
    font-size: 0.8rem;
    line-height: 1.4;

/* Error type specific styles */
.style-error.timeout-error .error-icon {
    color: #ffa726;

.style-error.timeout-error .error-title,
.style-error.timeout-error .error-message {

.style-error.server-error .error-icon {
    color: #ef5350;

.style-error.network-error .error-icon {
    color: #42a5f5;

.style-error.network-error .error-title,
.style-error.network-error .error-message {

/* Enhanced button styles */
.retry-button,
.manual-retry-button {
    border: none;
    padding: 12px 24px;
    transition: all 0.3s ease;
    gap: 8px;
    text-transform: none;
    min-width: 120px;

.retry-button.primary {
    background: linear-gradient(45deg, #45b7d1, #4ecdc4);
    color: white;
    box-shadow: 0 4px 15px rgba(69, 183, 209, 0.3);

.retry-button.primary:hover {
    background: linear-gradient(45deg, #3a9bc1, #42b8b0);
    box-shadow: 0 6px 20px rgba(69, 183, 209, 0.4);

.manual-retry-button.secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);

.manual-retry-button.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);

.retry-button .button-icon,
.manual-retry-button .button-icon {

/* Loading spinner animation */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(78, 205, 196, 0.2);
    border-top: 4px solid #4ecdc4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;

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

/* Responsive error styles */
@media (max-width: 768px) {
        padding: 25px 20px;
        margin: 15px 10px;
    
        flex-direction: column;
    
        width: 100%;
        max-width: 200px;

/* ===== ENTRY SELECTION STYLES ===== */

.entry-selection-container {

.entry-section-title h3 {

.entry-section-title h3::before {
    content: "🎬";

.section-description {

/* Character count filter */
.character-count-filter {
    background: rgba(255, 255, 255, 0.03);

.character-count-filter h4 {
    color: #45b7d1;
    margin-bottom: 15px;

.count-filter-buttons {
    gap: 10px;

.count-filter-btn {
    padding: 8px 16px;

.count-filter-btn:hover {
    border-color: #45b7d1;
    background: rgba(69, 183, 209, 0.1);

.count-filter-btn.active {
    background: rgba(255, 107, 107, 0.2);

/* Entry selection grid */
.entry-selection-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;

.entry-selection-card {
    position: relative;

.entry-selection-card:hover {
    background: rgba(78, 205, 196, 0.05);

.entry-selection-card.selected {
    background: rgba(255, 107, 107, 0.1);

.entry-selection-card.selected::before {
    top: 15px;
    right: 15px;
    background: #ff6b6b;
    width: 25px;
    height: 25px;

/* Entry card header */
.entry-card-header {
    justify-content: space-between;

.entry-card-header h4 {

.character-count-badge {
    background: rgba(69, 183, 209, 0.2);
    padding: 4px 12px;

/* Entry card content */
.entry-card-content {

.character-descriptions {

.character-desc-item {
    margin-bottom: 8px;

.char-index {
    min-width: 80px;
    flex-shrink: 0;

.char-desc {

.prompt-preview {
    padding: 12px;
    border-left: 3px solid #4ecdc4;

.prompt-preview strong {

.prompt-text {
    font-size: 0.85rem;
    margin: 8px 0 0 0;

/* Entry card actions */
.entry-card-actions {

.select-entry-btn {
    background: linear-gradient(45deg, #4ecdc4, #45b7d1);
    padding: 10px 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;

.select-entry-btn:hover {
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.3);

.entry-selection-card.selected .select-entry-btn {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);

/* Entry selection feedback */
.entry-selection-feedback {

.entry-selection-feedback.success {

.entry-selection-feedback.error {
    border: 1px solid #ff6b6b;

.entry-selection-feedback .feedback-icon {

/* No entries message */
.no-entries-message {
    padding: 60px 20px;

.no-entries-icon {
    font-size: 3rem;
    display: block;

.no-entries-message h4 {

.no-entries-message p {

/* Entry selection info */
.entry-selection-info {
    border: 1px solid #45b7d1;
    padding: 15px;

.selection-info-text {

/* Loading and error states for entries */
.entry-loading,
.entry-error {

/* ===== SELECTION SUMMARY STYLES ===== */

.selection-summary-container {
    padding: 25px;
    display: none;

.selection-summary h4 {

.selection-summary h4::before {
    content: "📋";

.summary-items {

.summary-item {

.summary-label {

.summary-value {

/* ===== ERROR AND VALIDATION STYLES ===== */

.preset-error-container {

.validation-errors h4 {

.error-list {
    list-style: none;
    padding: 0;

.error-list li {
    padding: 8px 0;

.error-list li::before {
    content: "⚠";

.general-error {

.error-icon {
    margin-right: 12px;

/* ===== PROGRESS INDICATORS ===== */

.progress-indicators {

.progress-indicator {
    min-width: 100px;

.progress-indicator.pending {

.progress-indicator.completed {
    border: 2px solid #4ecdc4;

.progress-indicator .indicator-icon {

.progress-indicator .indicator-label {

.progress-indicator.completed .indicator-icon::after {
    content: " ✓";

/* ===== ANIMATIONS ===== */

@keyframes slideInFromTop {
    0% {
        transform: translateY(-20px);
    100% {
        transform: translateY(0);

@keyframes fadeInScale {
        transform: scale(0.9);
        transform: scale(1);

/* Staggered animation for grid items */
.ui-flow-showing .style-selection-button,
.ui-flow-showing .entry-selection-card {
    animation: fadeInScale 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;

.ui-flow-showing .style-selection-button:nth-child(1),
.ui-flow-showing .entry-selection-card:nth-child(1) { animation-delay: 0.1s; }
.ui-flow-showing .style-selection-button:nth-child(2),
.ui-flow-showing .entry-selection-card:nth-child(2) { animation-delay: 0.2s; }
.ui-flow-showing .style-selection-button:nth-child(3),
.ui-flow-showing .entry-selection-card:nth-child(3) { animation-delay: 0.3s; }
.ui-flow-showing .style-selection-button:nth-child(4),
.ui-flow-showing .entry-selection-card:nth-child(4) { animation-delay: 0.4s; }
.ui-flow-showing .style-selection-button:nth-child(n+5),
.ui-flow-showing .entry-selection-card:nth-child(n+5) { animation-delay: 0.5s; }

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 1200px) {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));

        grid-template-columns: 1fr;

        justify-content: flex-start;

        align-items: flex-start;
        gap: 5px;

@media (max-width: 480px) {
    .style-selection-container,
    .entry-selection-container,

        min-width: auto;

/* ===== ACCESSIBILITY ENHANCEMENTS ===== */

/* Focus indicators */
.style-selection-button:focus,
.entry-selection-card:focus,
.count-filter-btn:focus,
.select-entry-btn:focus {

/* Screen reader only text */
.sr-only {
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;

/* High contrast mode support */
@media (prefers-contrast: high) {
    .style-selection-button,
        border-width: 3px;
    
    .style-selection-button.selected,
        border-width: 4px;

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .entry-selection-card,
    .count-filter-btn,
        transition: none;
    
        animation: none;
/* Utility Classes */
.hidden {
    display: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.focus-visible:focus-visible {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}
