/**
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * ⚡ APC System - AI Tip CSS
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * 📁 파일명: /www/_acc/css/ai_tip.css
 * 📌 버전: v1.1
 * 📅 작성일: 2025-12-27
 * 📝 설명: 기존 v1.0 + Structure/Elements 스타일 추가
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   AI Tip 섹션 로딩 상태 (기존 v1.0)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.ai-tip-section.loading {
    opacity: 0.85;
}

/* ★★★ AI 로딩 메시지 스타일 ★★★ */
.ai-loading-message {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ✨ 이모지 스파클 애니메이션 */
.ai-sparkle {
    font-size: 1rem;
    animation: sparkle 1.2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.15);
    }
}

/* 로딩 플레이스홀더 - 키워드 태그 */
.tip-tag.loading-placeholder,
.element-tag.loading-placeholder {
    background: linear-gradient(90deg, #d1fae5 25%, #a7f3d0 50%, #d1fae5 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    width: 60px;
    height: 20px;
    border-radius: 12px;
    display: inline-block;
}

/* 로딩 텍스트 */
.loading-text {
    color: #6b7280;
    font-style: italic;
    animation: pulse 1.5s ease-in-out infinite;
}

/* 쉬머 애니메이션 */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* 펄스 애니메이션 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   AI Tip 태그 호버 효과 (기존 v1.0)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.tip-tag {
    transition: all 0.2s ease;
    cursor: default;
}

.tip-tag:hover {
    background: #a7f3d0;
    transform: translateY(-1px);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ★★★ [v1.1] Structure 스타일 ★★★
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.structure-row {
    flex-direction: column;
    align-items: flex-start !important;
}

.structure-content {
    width: 100%;
    margin-top: 6px;
    padding: 8px 10px;
    background: rgba(16, 185, 129, 0.08);
    border-radius: 8px;
    font-size: 0.8rem;
}

.structure-item {
    display: flex;
    margin-bottom: 4px;
    line-height: 1.4;
}

.structure-item:last-child {
    margin-bottom: 0;
}

.struct-label {
    font-weight: 600;
    color: #059669;
    min-width: 90px;
    flex-shrink: 0;
}

.struct-value {
    color: #374151;
    word-break: break-word;
}

.structure-placeholder {
    color: #9ca3af;
    font-style: italic;
    font-size: 0.8rem;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ★★★ [v1.1] Elements (Missing) 스타일 ★★★
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.element-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.element-tag {
    display: inline-block;
    padding: 3px 10px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid #fcd34d;
    transition: all 0.2s ease;
}

.element-tag:hover {
    background: linear-gradient(135deg, #fde68a, #fcd34d);
    transform: translateY(-1px);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   AI Tip 섹션 애니메이션 (콘텐츠 변경 시) (기존 v1.0)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.ai-tip-section {
    transition: opacity 0.3s ease;
}

.ai-tip-section .tip-tags,
.ai-tip-section .element-tags {
    transition: all 0.3s ease;
}

.ai-tip-section .tip-row span:not(.tip-label) {
    transition: all 0.3s ease;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   다크 모드 로딩 상태 (기존 v1.0)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
[data-theme="dark"] .tip-tag.loading-placeholder,
[data-theme="dark"] .element-tag.loading-placeholder {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

[data-theme="dark"] .loading-text {
    color: #9ca3af;
}

/* ★★★ 다크모드 AI 로딩 메시지 ★★★ */
[data-theme="dark"] .ai-loading-message span {
    color: #fbbf24 !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ★★★ 다크모드 AI Tip 섹션 - 선택자 우선순위 강화 (기존 v1.0) ★★★
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
[data-theme="dark"] #generateTabContent .ai-tip-section {
    background: linear-gradient(135deg, #1f3a2e, #1a3329) !important;
    border-color: #2d5a45 !important;
}

[data-theme="dark"] #generateTabContent .ai-tip-section .ai-tip-header {
    color: #34d399 !important;
}

[data-theme="dark"] #generateTabContent .ai-tip-section .tip-row {
    color: #e5e7eb !important;
}

[data-theme="dark"] #generateTabContent .ai-tip-section .tip-label {
    color: #34d399 !important;
}

/* ★★★ Tips 텍스트 색상 - 최우선 적용 ★★★ */
[data-theme="dark"] #generateTabContent .ai-tip-section #aiTipText {
    color: #FF6B35 !important;
}

[data-theme="dark"] #generateTabContent .ai-tip-section .tip-row > span:last-child {
    color: #34d399 !important;
}

/* ★★★ 다크모드 키워드 태그 ★★★ */
[data-theme="dark"] #generateTabContent .ai-tip-section .tip-tag {
    background: #2d5a45 !important;
    color: #a7f3d0 !important;
}

[data-theme="dark"] #generateTabContent .ai-tip-section .tip-tag:hover {
    background: #34d399 !important;
    color: #1f2937 !important;
}

/* ★★★ [v1.1] 다크모드 Structure ★★★ */
[data-theme="dark"] #generateTabContent .structure-content {
    background: rgba(52, 211, 153, 0.1);
}

[data-theme="dark"] #generateTabContent .struct-label {
    color: #34d399;
}

[data-theme="dark"] #generateTabContent .struct-value {
    color: #e5e7eb;
}

[data-theme="dark"] #generateTabContent .structure-placeholder {
    color: #6b7280;
}

/* ★★★ [v1.1] 다크모드 Elements ★★★ */
[data-theme="dark"] #generateTabContent .element-tag {
    background: linear-gradient(135deg, #78350f, #92400e);
    color: #fef3c7;
    border-color: #b45309;
}

[data-theme="dark"] #generateTabContent .element-tag:hover {
    background: linear-gradient(135deg, #92400e, #b45309);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   AI Tip 아이콘 회전 (로딩 시) (기존 v1.0)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.ai-tip-section.loading .ai-tip-header i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   모바일 반응형 (v1.1 추가)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 768px) {
    .structure-content {
        padding: 6px 8px;
    }
    
    .structure-item {
        flex-direction: column;
    }
    
    .struct-label {
        min-width: auto;
        margin-bottom: 2px;
    }
}