/**
 * Numex Creative Canvas — Profesyonel görsel önizleme alanı
 * Numex Creative Studio modal sağ paneli
 */

/* ─── CONTAINER ─── */
.creative-canvas {
    flex: 1;
    min-width: 0;
    min-height: 280px;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}
@media (min-width: 640px) {
    .creative-canvas { min-height: 340px; aspect-ratio: 4/3; }
}
@media (max-width: 640px) {
    .creative-canvas { min-height: 240px; width: 100%; }
}

/* Animated gradient mesh arka plan */
.creative-canvas::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 20% 20%, rgba(124, 58, 237, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 80% at 80% 80%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 50% 50% at 50% 50%, rgba(124, 58, 237, 0.05) 0%, transparent 70%);
    animation: cc-mesh-shift 12s ease-in-out infinite;
    pointer-events: none;
}
@keyframes cc-mesh-shift {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

/* Subtle dot/grid pattern köşelerde */
.creative-canvas::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(124, 58, 237, 0.12) 1px, transparent 0);
    background-size: 24px 24px;
    pointer-events: none;
    opacity: 0.5;
}

/* Dekoratif köşe parantezleri */
.creative-canvas-corner {
    position: absolute;
    width: 24px;
    height: 24px;
    border-color: rgba(124, 58, 237, 0.4);
    border-style: solid;
    border-width: 0;
    pointer-events: none;
}
.creative-canvas-corner.tl { top: 12px; left: 12px; border-top-width: 2px; border-left-width: 2px; border-radius: 4px 0 0 0; }
.creative-canvas-corner.tr { top: 12px; right: 12px; border-top-width: 2px; border-right-width: 2px; border-radius: 0 4px 0 0; }
.creative-canvas-corner.bl { bottom: 12px; left: 12px; border-bottom-width: 2px; border-left-width: 2px; border-radius: 0 0 0 4px; }
.creative-canvas-corner.br { bottom: 12px; right: 12px; border-bottom-width: 2px; border-right-width: 2px; border-radius: 0 0 4px 0; }

/* ─── BOŞ DURUM (Empty State) ─── */
.cc-empty {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 32px;
    width: 100%;
}

/* Drop zone ikonu — animated dashed border */
.cc-drop-zone {
    width: 120px;
    height: 120px;
    cursor: pointer;
    border-radius: 20px;
    border: 2px dashed rgba(124, 58, 237, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
    animation: cc-dash-pulse 2.5s ease-in-out infinite;
}
.cc-drop-zone::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 24px;
    border: 1px dashed rgba(0, 212, 255, 0.3);
    animation: cc-dash-pulse 2.5s ease-in-out infinite 0.5s;
}
.cc-drop-zone.drag-over,
.cc-drop-zone.cc-drag-over {
    border-color: #00d4ff;
    background: rgba(0, 212, 255, 0.08);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.2);
    transform: scale(1.02);
}
.cc-drop-zone svg {
    width: 48px;
    height: 48px;
    stroke: rgba(124, 58, 237, 0.7);
    transition: stroke 0.3s ease;
}
.cc-drop-zone.drag-over svg,
.cc-drop-zone.cc-drag-over svg { stroke: #00d4ff; }
@keyframes cc-dash-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Başlık — gradient text */
.cc-empty-title {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #e0e7ff 40%, #00d4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    letter-spacing: -0.02em;
}
@media (max-width: 640px) {
    .cc-empty-title { font-size: 18px; }
}

/* Açıklama */
.cc-empty-desc {
    font-size: 13px;
    color: rgba(156, 163, 175, 0.9);
    text-align: center;
    max-width: 280px;
}
.cc-drop-zone.cc-drag-over + .cc-empty-title + .cc-empty-desc,
.cc-drop-zone.drag-over + .cc-empty-title + .cc-empty-desc { color: rgba(0, 212, 255, 0.9); }
.cc-drop-zone:focus-visible { outline: 2px solid #00d4ff; outline-offset: 4px; }

/* Desteklenen formatlar */
.cc-file-input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

.cc-format-hint {
    font-size: 11px;
    color: rgba(107, 114, 128, 0.8);
    margin-top: 8px;
}

/* ─── LOADING DURUMU ─── */
.cc-loading {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 32px;
    width: 100%;
}

/* Orbital parçacıklar + AI ikonu */
.cc-orbital-wrap {
    position: relative;
    width: 120px;
    height: 120px;
}
.cc-orbital-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #7c3aed, #00d4ff);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
}
.cc-orbital-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #00d4ff;
    border-radius: 50%;
    animation: cc-orbit 2s linear infinite;
}
.cc-orbital-dot:nth-child(2) { top: 0; left: 50%; transform: translateX(-50%); animation-delay: 0s; }
.cc-orbital-dot:nth-child(3) { top: 50%; right: 0; transform: translateY(-50%); animation-delay: -0.5s; }
.cc-orbital-dot:nth-child(4) { bottom: 0; left: 50%; transform: translateX(-50%); animation-delay: -1s; }
.cc-orbital-dot:nth-child(5) { top: 50%; left: 0; transform: translateY(-50%); animation-delay: -1.5s; }
.cc-orbital-dot:nth-child(6) { top: 15%; right: 15%; animation-delay: -0.25s; }
.cc-orbital-dot:nth-child(7) { bottom: 15%; right: 15%; animation-delay: -0.75s; }
.cc-orbital-dot:nth-child(8) { bottom: 15%; left: 15%; animation-delay: -1.25s; }
.cc-orbital-dot:nth-child(9) { top: 15%; left: 15%; animation-delay: -1.75s; }
@keyframes cc-orbit {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.cc-loading-text {
    font-size: 15px;
    font-weight: 500;
    color: rgba(209, 213, 219, 0.95);
}
.cc-loading-text .cc-typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: #00d4ff;
    margin-left: 2px;
    animation: cc-blink 0.8s step-end infinite;
    vertical-align: text-bottom;
}
@keyframes cc-blink {
    50% { opacity: 0; }
}

.cc-loading-elapsed {
    font-size: 14px;
    font-weight: 600;
    color: rgba(0, 212, 255, 0.9);
}

.cc-loading-hint {
    font-size: 12px;
    color: rgba(156, 163, 175, 0.75);
    margin: -8px 0 0;
}
.cc-loading-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}
.cc-loading-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #7c3aed, #00d4ff);
    border-radius: 4px;
    animation: cc-loading-progress 3s ease-in-out infinite;
}

.cc-loading-actions {
    margin-top: 16px;
}
@keyframes cc-loading-progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* Shimmer arka plan */
.cc-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(124, 58, 237, 0.03) 50%, transparent 60%);
    background-size: 200% 100%;
    animation: cc-shimmer 2.5s ease-in-out infinite;
    pointer-events: none;
}
@keyframes cc-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ─── GÖRSEL YÜKLENDİ / OLUŞTURULDU ─── */
.cc-success-wrap {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
    animation: cc-fade-scale 0.5s ease-out forwards;
}
@keyframes cc-fade-scale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.cc-success-img-container {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 0;
    overflow: auto;
}
.cc-success-img-container img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 60px rgba(124, 58, 237, 0.15), 0 0 100px rgba(0, 212, 255, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-origin: center center;
}

/* Hover overlay — köşede */
.cc-success-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    gap: 6px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, transparent 30%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.cc-success-overlay .cc-overlay-btn { pointer-events: auto; }
.cc-success-overlay.cc-overlay-corner {
    align-items: flex-start;
    justify-content: flex-end;
    padding: 12px 14px;
    background: none;
}
.cc-success-overlay.cc-overlay-corner .cc-overlay-btn {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
}
.cc-success-overlay.cc-overlay-corner .cc-overlay-btn:hover {
    background: rgba(124, 58, 237, 0.6);
}
.cc-success-img-container:hover .cc-success-overlay { opacity: 1; }

.cc-overlay-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.cc-overlay-btn:hover {
    background: rgba(124, 58, 237, 0.6);
    transform: scale(1.08);
}
.cc-overlay-btn:active { transform: scale(0.96); }
.cc-overlay-btn:focus-visible { outline: 2px solid #00d4ff; outline-offset: 2px; }
.cc-overlay-btn svg { width: 16px; height: 16px; }

/* Alt bar — minimal, fotoğrafın bittiği noktada */
.cc-success-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.25);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 11px;
}
.cc-meta-mini {
    color: rgba(156, 163, 175, 0.8);
}
.cc-actions-mini {
    display: flex;
    align-items: center;
    gap: 4px;
}
.cc-mini-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: rgba(209, 213, 219, 0.8);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.cc-mini-btn:hover {
    background: rgba(124, 58, 237, 0.25);
    color: #fff;
}
.cc-mini-btn svg { width: 16px; height: 16px; }
.cc-add-chat-mini {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}
.cc-add-chat-mini:hover {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    box-shadow: 0 0 16px rgba(124, 58, 237, 0.4);
}

/* Metadata bar (legacy) */
.cc-metadata {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 10px 16px;
    margin-top: 12px;
    font-size: 11px;
    color: rgba(156, 163, 175, 0.9);
}

/* Her zaman görünen aksiyon barı — indir, tam ekran, kopyala */
.cc-action-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}
.cc-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(124, 58, 237, 0.4);
    border-radius: 10px;
    background: rgba(15, 52, 96, 0.4);
    color: rgba(209, 213, 219, 0.95);
    cursor: pointer;
    transition: all 0.3s ease;
}
.cc-action-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.cc-action-btn:hover {
    background: rgba(124, 58, 237, 0.35);
    border-color: #00d4ff;
    color: #fff;
    transform: translateY(-1px);
}
.cc-action-btn:focus-visible { outline: 2px solid #00d4ff; outline-offset: 2px; }

/* ─── HATA DURUMU ─── */
.cc-error {
    position: relative;
    z-index: 1;
    padding: 24px;
    text-align: center;
    animation: cc-fade-scale 0.4s ease-out forwards;
}

/* ─── NUMEX CREATIVE STUDIO — SAĞ KONTROL PANELİ ─── */
.image-generator-modal .img-gen-panel-card {
    background: linear-gradient(180deg, rgba(26, 26, 46, 0.5) 0%, rgba(15, 23, 42, 0.6) 100%);
    border-color: rgba(124, 58, 237, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.image-generator-modal .img-gen-aspect {
    border-color: rgba(124, 58, 237, 0.2);
    color: rgba(148, 163, 184, 0.9);
}
.image-generator-modal .img-gen-aspect:hover {
    color: #94a3b8;
    background: rgba(124, 58, 237, 0.06);
    border-color: rgba(124, 58, 237, 0.3);
}
.image-generator-modal .img-gen-aspect.active {
    background: linear-gradient(180deg, rgba(124, 58, 237, 0.2) 0%, rgba(59, 130, 246, 0.12) 100%);
    color: #93c5fd;
    border-color: rgba(96, 165, 250, 0.5);
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.15);
}

.image-generator-modal .img-gen-select {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(124, 58, 237, 0.2);
    color: #e2e8f0;
}
.image-generator-modal .img-gen-select:hover {
    border-color: rgba(124, 58, 237, 0.4);
}
.image-generator-modal .img-gen-select:focus {
    border-color: rgba(96, 165, 250, 0.6);
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.15);
}
.image-generator-modal .img-gen-select option {
    background: #1a1a2e;
    color: #e2e8f0;
}

.image-generator-modal .img-gen-style-card:hover {
    background: rgba(124, 58, 237, 0.15) !important;
    border-color: rgba(124, 58, 237, 0.35) !important;
}
.image-generator-modal .img-gen-style-card.selected {
    background: rgba(124, 58, 237, 0.25) !important;
    border-color: rgba(96, 165, 250, 0.5) !important;
    box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.25);
}

.image-generator-modal .img-gen-footer {
    border-top-color: rgba(124, 58, 237, 0.15);
}
.image-generator-modal .img-gen-input-wrap textarea:focus {
    border-color: rgba(0, 212, 255, 0.6);
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.2);
}

.image-generator-modal .img-gen-btn-primary {
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
    box-shadow: 0 0 24px rgba(124, 58, 237, 0.4), 0 4px 20px rgba(0, 0, 0, 0.3);
}
.image-generator-modal .img-gen-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    box-shadow: 0 0 32px rgba(124, 58, 237, 0.5), 0 0 48px rgba(0, 212, 255, 0.15);
}

/* Sohbete Ekle butonu — Creative Canvas içindeki */
.cc-add-chat {
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%) !important;
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.35) !important;
}
.cc-add-chat:hover {
    box-shadow: 0 0 28px rgba(124, 58, 237, 0.5), 0 0 40px rgba(0, 212, 255, 0.15) !important;
}
