/* ITERATION 239: Emoji Variables Panel Styles - Corrected */

/* Main floating panel - dark theme by default */
.emoji-variable-floating-panel {
    position: fixed;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    width: 700px;
    height: 900px;
    overflow: hidden;
    z-index: 1000011;
    display: flex;
    flex-direction: column;
}

/* Close button */
.emoji-panel-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 24px;
    color: #888;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    z-index: 1;
    transition: color 0.2s;
}

.emoji-panel-close:hover {
    color: #fff;
}

/* Inner scrollable content */
.emoji-variable-panel {
    background: transparent;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    color: #e5e7eb;
}

/* Header */
.emoji-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #3b82f6;
}

.emoji-panel-header h3 {
    margin: 0;
    color: #f3f4f6;
    font-size: 18px;
}

.emoji-panel-version {
    font-size: 12px;
    color: #9ca3af;
}

/* Category Styles */
.emoji-category {
    margin-bottom: 24px;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #d1d5db;
    font-size: 14px;
    font-weight: 600;
}

.category-icon {
    font-size: 16px;
}

.category-description {
    margin: 0 0 12px 0;
    font-size: 12px;
    color: #9ca3af;
}

/* Emoji Grid */
.emoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.emoji-grid.compact-grid {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 6px;
}

.emoji-button {
    background: #374151;
    border: 1px solid #4b5563;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    color: #e5e7eb;
}

.emoji-button:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    border-color: #3b82f6;
}

.emoji-icon {
    display: block;
    font-size: 24px;
    margin-bottom: 4px;
}

.emoji-name {
    font-size: 11px;
    font-weight: 500;
    display: block;
}

/* Quick Reference */
.quick-reference {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #374151;
}

.quick-reference h4,
.common-patterns h4 {
    color: #d1d5db;
    font-size: 14px;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.tips-list {
    margin: 0;
    padding-left: 20px;
    list-style: none;
}

.tips-list li {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 6px;
    position: relative;
    padding-left: 12px;
}

.tips-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #3b82f6;
}

/* Pattern Examples */
.pattern-example {
    margin-bottom: 12px;
    padding: 10px;
    background: #374151;
    border: 1px solid #4b5563;
    border-radius: 6px;
}

.pattern-example code {
    display: block;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 12px;
    color: #60a5fa;
    background: #1f2937;
    padding: 4px;
    border-radius: 3px;
    margin-bottom: 4px;
    overflow-x: auto;
}

.pattern-example p {
    margin: 0;
    font-size: 11px;
    color: #9ca3af;
}

/* Emoji picker button in studio */
.emoji-picker-btn,
.emoji-pad-btn {
    background: #333;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 100;
}

.emoji-picker-btn:hover,
.emoji-pad-btn:hover {
    background: #444;
    border-color: #3b82f6;
    transform: scale(1.05);
}

/* Click Animation */
.emoji-button.clicked {
    animation: emojiClick 0.3s ease;
}

@keyframes emojiClick {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); background: #3b82f6; }
    100% { transform: scale(1); }
}

/* Compact Mode */
.emoji-variable-panel.compact .emoji-panel-header {
    margin-bottom: 12px;
    padding-bottom: 8px;
}

.emoji-variable-panel.compact .emoji-category {
    margin-bottom: 16px;
}

.emoji-variable-panel.compact .category-header {
    font-size: 13px;
}

/* Scrollbar styling */
.emoji-variable-panel::-webkit-scrollbar {
    width: 8px;
}

.emoji-variable-panel::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

.emoji-variable-panel::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 4px;
}

.emoji-variable-panel::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Modal styles if needed */
.emoji-reference-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000012;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000011;
}

.modal-content {
    background: #1f2937;
    color: #e5e7eb;
    border-radius: 12px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 1000013;
}