/* Path: T2Editor/plugin/ai_rearrange/ai_rearrange.css */

/* --- Animations --- */
@keyframes aurora-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(102, 126, 234, 0.6), 0 0 20px rgba(102, 126, 234, 0.4), 0 0 30px rgba(102, 126, 234, 0.2); }
    50% { box-shadow: 0 0 15px rgba(139, 92, 246, 0.8), 0 0 30px rgba(139, 92, 246, 0.5), 0 0 45px rgba(139, 92, 246, 0.3); }
}

@keyframes aurora-shimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes icon-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

@keyframes aurora-text-glow {
    0%, 100% { 
        text-shadow: 0 0 10px rgba(59, 130, 246, 0.5), 0 0 20px rgba(139, 92, 246, 0.3);
    }
    50% { 
        text-shadow: 0 0 15px rgba(59, 130, 246, 0.7), 0 0 30px rgba(139, 92, 246, 0.5);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideUp {
    from { transform: translate(-50%, -60%); opacity: 0; }
    to { transform: translate(-50%, -50%); opacity: 1; }
}

@keyframes slideOut {
    from {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
    to {
        transform: translate(-50%, -60%);
        opacity: 0;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translate(-50%, 10px); }
    15% { opacity: 1; transform: translate(-50%, 0); }
    85% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, -10px); }
}

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

@keyframes rainbow {
    0% { color: #667eea; }
    25% { color: #764ba2; }
    50% { color: #6B8DD6; }
    75% { color: #8E37D7; }
    100% { color: #667eea; }
}

/* --- Detail Edit Mode UI --- */
.t2-detail-edit-selected {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.15), rgba(139, 92, 246, 0.15), rgba(102, 126, 234, 0.15)) !important;
    background-size: 200% 100% !important;
    animation: aurora-shimmer 3s ease infinite, aurora-glow 2s ease-in-out infinite !important;
    border-radius: 4px !important;
    padding: 2px 4px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    outline: 2px solid rgba(102, 126, 234, 0.3) !important;
}

.t2-detail-edit-icon {
    animation: icon-pulse 2s ease-in-out infinite;
}

.t2-detail-edit-pill-modal {
    position: absolute;
    background: white;
    border-radius: 24px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.2), 0 0 20px rgba(102, 126, 234, 0.3);
    padding: 16px 20px;
    z-index: 10003;
    min-width: 320px;
    max-width: 480px;
    animation: slideIn 0.3s ease-out;
    pointer-events: auto;
}

.t2-detail-edit-pill-modal.multiple-selection {
    position: absolute !important;
    opacity: 0.85;
}

.t2-detail-edit-exit-button {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10004;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(100, 100, 100, 0.75);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(239, 68, 68, 0.6);
    border-radius: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.t2-detail-edit-exit-button:hover {
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    background: rgba(120, 120, 120, 0.85);
}

.t2-detail-edit-exit-icon {
    width: 20px;
    height: 20px;
    background: #ef4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.t2-detail-edit-guide {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10004;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 24px;
    background: rgba(60, 60, 70, 0.85);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    animation: aurora-glow 2s ease-in-out infinite;
}

.t2-detail-edit-guide-text {
    color: white;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    animation: aurora-text-glow 2s ease-in-out infinite;
}

.t2-detail-edit-guide-subtext {
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    text-align: center;
}

.t2-detail-edit-rate-limit {
    position: absolute;
    bottom: -20px;
    right: 0;
    font-size: 11px;
    color: #9ca3af;
    font-weight: 500;
}

.t2-image-edit-message {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(31, 41, 55, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(75, 85, 99, 0.5);
    border-radius: 24px;
    padding: 12px 20px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    z-index: 10005;
    animation: fadeInOut 3.5s ease-in-out;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* --- Custom Popups --- */
.t2-custom-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10010;
    animation: fadeIn 0.3s ease-out;
    pointer-events: none;
}

.t2-custom-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 24px 32px;
    color: #333;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    max-width: 400px;
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
}

.t2-custom-popup-icon {
    font-size: 48px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- AI Info Popup --- */
.t2-ai-info-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    padding: 24px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 10002;
    animation: slideIn 0.3s ease-out;
}

/* --- Responsive --- */
@media (max-width: 640px) {
    .t2-rearrange-execute-text,
    .t2-rearrange-detail-edit-text {
        display: none !important;
    }
}