/* Base prompt container styles */
.prompt-container {
    background: linear-gradient(135deg, #9333ea33, #8b5cf644);
    border-left: 4px solid #8b5cf6;
    border-radius: 8px;
    margin: 10px 0 20px 0;
    padding: 16px 16px 16px 20px;
    position: relative;
    box-shadow: 0 4px 6px rgba(139, 92, 246, 0.3);
    transition: all 0.3s ease;
    z-index: 20;
    width: calc(100% - 10px);
    max-width: 100%;
    animation: prompt-fade-in 0.5s ease-out;
}

.prompt-container:hover {
    box-shadow: 0 6px 12px rgba(139, 92, 246, 0.15);
    transform: translateY(-2px);
}

@keyframes prompt-fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.prompt-content {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.6;
    margin-bottom: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    word-wrap: break-word;
    overflow-wrap: break-word;
    position: relative;
    padding-left: 28px;
}

.prompt-content::before {
    content: '"';
    position: absolute;
    left: 0;
    top: -5px;
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.4);
    font-family: Georgia, serif;
    line-height: 1;
}

.prompt-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.prompt-icon {
    position: absolute;
    top: -10px;
    right: -6px;
    background: #8b5cf6;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.5);
    z-index: 2;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.prompt-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(139, 92, 246, 0.7);
}

.prompt-dismiss {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 4px 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.prompt-dismiss:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.prompt-dismiss::before {
    content: '×';
    font-size: 1rem;
    line-height: 0.8;
}

/* Additional styles to ensure visibility and positioning */
.modal-body .prompt-container {
    margin-top: 18px;
    margin-bottom: 20px;
    position: relative;
    z-index: 20;
}

.prompt-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

/* Removed .prompt-use-button styles as it's no longer needed */

/* Light theme adjustments */
@media (prefers-color-scheme: light) {
    .prompt-container {
        background: linear-gradient(135deg, #9333ea15, #8b5cf625);
        box-shadow: 0 4px 6px rgba(139, 92, 246, 0.15);
        border-left: 4px solid #8b5cf6;
    }
    
    .prompt-content {
        color: #4b0082;
        text-shadow: none;
    }
    
    .prompt-content::before {
        color: rgba(75, 0, 130, 0.2);
    }
    
    .prompt-footer {
        color: #6b7280;
    }
    
    .prompt-dismiss {
        background: rgba(75, 0, 130, 0.05);
        border: 1px solid rgba(75, 0, 130, 0.1);
        color: #6b7280;
    }
    
    .prompt-dismiss:hover {
        background: rgba(75, 0, 130, 0.1);
        color: #4b0082;
    }
    
    .prompt-use-button {
        background: rgba(75, 0, 130, 0.05);
        border: 1px solid rgba(75, 0, 130, 0.1);
        color: #6b7280;
    }
    
    .prompt-use-button:hover {
        background: rgba(75, 0, 130, 0.1);
        color: #4b0082;
    }
}

/* Theme-specific styles */
/* Dark theme (Day One Dark) */
.dark-theme .prompt-container,
body.dark .prompt-container {
    background: linear-gradient(135deg, #9333ea33, #8b5cf644);
    border-left: 4px solid #8b5cf6;
}

.dark-theme .prompt-content,
body.dark .prompt-content {
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.dark-theme .prompt-content::before,
body.dark .prompt-content::before {
    color: rgba(255, 255, 255, 0.4);
}

.dark-theme .prompt-footer,
body.dark .prompt-footer {
    color: rgba(255, 255, 255, 0.7);
}

.dark-theme .prompt-dismiss,
body.dark .prompt-dismiss {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

.dark-theme .prompt-dismiss:hover,
body.dark .prompt-dismiss:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Removed dark theme .prompt-use-button styles as it's no longer needed */

/* Light theme */
.light-theme .prompt-container,
body.light .prompt-container {
    background: linear-gradient(135deg, #9333ea15, #8b5cf625);
    box-shadow: 0 4px 6px rgba(139, 92, 246, 0.15);
    border-left: 4px solid #8b5cf6;
}

.light-theme .prompt-content,
body.light .prompt-content {
    color: #4b0082;
    text-shadow: none;
}

.light-theme .prompt-content::before,
body.light .prompt-content::before {
    color: rgba(75, 0, 130, 0.2);
}

.light-theme .prompt-footer,
body.light .prompt-footer {
    color: #6b7280;
}

.light-theme .prompt-dismiss,
body.light .prompt-dismiss {
    background: rgba(75, 0, 130, 0.05);
    border: 1px solid rgba(75, 0, 130, 0.1);
    color: #6b7280;
}

.light-theme .prompt-dismiss:hover,
body.light .prompt-dismiss:hover {
    background: rgba(75, 0, 130, 0.1);
    color: #4b0082;
}

/* Removed light theme .prompt-use-button styles as it's no longer needed */

/* Zen theme - using light theme colors */
.zen-theme .prompt-container,
body.zen .prompt-container {
    background: linear-gradient(135deg, #9333ea15, #8b5cf625);
    box-shadow: 0 4px 6px rgba(139, 92, 246, 0.15);
    border-left: 4px solid #8b5cf6;
}

.zen-theme .prompt-content,
body.zen .prompt-content {
    color: #4b0082;
    text-shadow: none;
}

.zen-theme .prompt-content::before,
body.zen .prompt-content::before {
    color: rgba(75, 0, 130, 0.2);
}

.zen-theme .prompt-footer,
body.zen .prompt-footer {
    color: #6b7280;
}

.zen-theme .prompt-dismiss,
body.zen .prompt-dismiss {
    background: rgba(75, 0, 130, 0.05);
    border: 1px solid rgba(75, 0, 130, 0.1);
    color: #6b7280;
}

.zen-theme .prompt-dismiss:hover,
body.zen .prompt-dismiss:hover {
    background: rgba(75, 0, 130, 0.1);
    color: #4b0082;
}

/* Removed zen theme .prompt-use-button styles as it's no longer needed */

/* Zen Garden theme - using light theme colors */
.zenGarden-theme .prompt-container,
body.zenGarden .prompt-container {
    background: linear-gradient(135deg, #9333ea15, #8b5cf625);
    box-shadow: 0 4px 6px rgba(139, 92, 246, 0.15);
    border-left: 4px solid #8b5cf6;
}

.zenGarden-theme .prompt-content,
body.zenGarden .prompt-content {
    color: #4b0082;
    text-shadow: none;
}

.zenGarden-theme .prompt-content::before,
body.zenGarden .prompt-content::before {
    color: rgba(75, 0, 130, 0.2);
}

.zenGarden-theme .prompt-footer,
body.zenGarden .prompt-footer {
    color: #6b7280;
}

.zenGarden-theme .prompt-dismiss,
body.zenGarden .prompt-dismiss {
    background: rgba(75, 0, 130, 0.05);
    border: 1px solid rgba(75, 0, 130, 0.1);
    color: #6b7280;
}

.zenGarden-theme .prompt-dismiss:hover,
body.zenGarden .prompt-dismiss:hover {
    background: rgba(75, 0, 130, 0.1);
    color: #4b0082;
}

/* Removed zenGarden theme .prompt-use-button styles as it's no longer needed */

/* Responsive adjustments */
@media (max-width: 640px) {
    .prompt-container {
        padding: 12px 12px 12px 16px;
    }
    
    .prompt-content {
        font-size: 1.1rem;
        padding-left: 20px;
    }
    
    .prompt-content::before {
        font-size: 2rem;
    }
    
    .prompt-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .prompt-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Fix for top right not being blocked */
.modal-header {
    z-index: 20;
    position: relative;
}

/* Prompt Loading Animation */
.prompt-loading-container {
    background: linear-gradient(135deg, #9333ea15, #8b5cf625);
    border-left: 4px solid #8b5cf6;
    border-radius: 8px;
    margin: 18px 0 20px 0;
    padding: 16px;
    position: relative;
    box-shadow: 0 4px 6px rgba(139, 92, 246, 0.15);
    z-index: 20;
    width: calc(100% - 10px);
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    animation: prompt-fade-in 0.5s ease-out;
}

.prompt-loading-text {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 12px;
    color: #4b0082;
}

.prompt-loading-spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(139, 92, 246, 0.2);
    border-radius: 50%;
    border-top-color: #8b5cf6;
    animation: prompt-spin 1s ease-in-out infinite;
}

@keyframes prompt-spin {
    to { transform: rotate(360deg); }
}

/* Dark theme styles for loading */
body.dark .prompt-loading-container {
    background: linear-gradient(135deg, #9333ea33, #8b5cf644);
}

body.dark .prompt-loading-text {
    color: white;
}

body.dark .prompt-loading-spinner {
    border-color: rgba(255, 255, 255, 0.2);
    border-top-color: white;
}

/* Timeline prompt component styles */
.timeline-prompt-component {
    background: linear-gradient(135deg, #9333ea08, #8b5cf615);
    border-left: 2px solid #8b5cf6;
    border-radius: 6px;
    margin-bottom: 0;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    width: 99.5%; /* Make it as wide as the bubble */
    max-width: 99.5%;
    display: block; /* Change to block for full width */
    position: relative;
    padding-left: 24px; /* Increase padding for bigger icon */
    box-sizing: border-box; /* Ensure padding is included in width */
    cursor: pointer; /* Indicate it's clickable */
}

/* Hover effect to indicate clickability */
.timeline-prompt-component:hover {
    background: linear-gradient(135deg, #9333ea15, #8b5cf625);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.timeline-prompt-component .prompt-icon {
    font-size: 1rem;
    color: #8b5cf6;
}

.timeline-prompt-component .prompt-content {
    color: inherit;
    font-size: 0.95rem; /* Bigger text */
    padding-left: 0;
    margin-bottom: 0;
    text-shadow: none;
    font-style: italic;
    line-height: 1.4;
}

/* Add a subtle prompt icon */
.timeline-prompt-component::before {
    content: '💬';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem; /* Bigger icon */
}

.timeline-prompt-component .prompt-content::before {
    content: none;
}

/* Dark mode timeline prompt */
body.dark .timeline-prompt-component {
    background: linear-gradient(135deg, #9333ea22, #8b5cf633);
    color: #e2e8f0;
    border-color: #8b5cf6;
}

/* Light mode timeline prompt */
body.light .timeline-prompt-component {
    background: linear-gradient(135deg, #9333ea10, #8b5cf620);
    color: #4a5568;
    border-color: #8b5cf6;
}

/* Zen mode timeline prompt - same as light */
body.zen .timeline-prompt-component {
    background: linear-gradient(135deg, #9333ea10, #8b5cf620);
    color: #4a5568;
    border-color: #8b5cf6;
}

/* Zen Garden mode timeline prompt - adjusted to match zen garden theme */
body.zen-garden .timeline-prompt-component {
    background: linear-gradient(135deg, #f3f4f610, #e5e7eb20);
    color: #4b5563;
    border-color: #9ca3af;
    border-left: 2px solid #9ca3af;
}

/* Timeline prompt container positioning */
.timeline-prompt-container {
    position: relative;
    margin-top: 5px;
    margin-bottom: 8px;
    margin-left: 36px; /* Align with the avatar */
    width: 100%;
    max-width: calc(100% - 36px); /* Account for the left margin */
    box-sizing: border-box;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .timeline-prompt-container {
        margin-left: 30px;
        max-width: calc(100% - 30px);
    }
    
    .timeline-prompt-component {
        padding-left: 20px;
    }
    
    .timeline-prompt-component::before {
        left: 6px;
        font-size: 1rem;
    }
    
    .timeline-prompt-component .prompt-content {
        font-size: 0.9rem;
        margin-left: 4px;
    }
}

@media (max-width: 480px) {
    .timeline-prompt-container {
        margin-left: 20px;
        max-width: calc(100% - 20px);
    }
    
    .timeline-prompt-component {
        padding-left: 18px;
    }
    
    .timeline-prompt-component::before {
        left: 5px;
        font-size: 0.9rem;
    }
}
