/* Smart Morphing Dropbox Styles */

/* Main Container Transition */
.upload-box {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    min-height: 420px; /* Start height */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* State Views - Absolute to allow cross-fading */
.state-view {
    width: 100%;
    /* Position absolute for transitions, but we might need height management */
    transition: all 0.4s ease-out;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateY(20px);
}

.state-view.active {
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%) translateY(0);
    position: relative; /* Switch to relative when active to take up space? No, causes layout jump. */
    /* Better approach: animate height of container, keep content absolute/relative mix */
}

/* Fix for relative positioning layout flow */
.state-view {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translateY(20px);
}

.state-view.active {
    transform: translateY(0);
}

.state-view.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-20px);
}

/* Task Grid Styles */
.smart-task-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    width: 100%;
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.task-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.task-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.task-icon {
    font-size: 24px;
    background: #eff6ff;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.task-title {
    font-weight: 700;
    color: var(--text-main);
    font-size: 15px;
}

.task-desc {
    font-size: 13px;
    color: var(--text-muted);
}

/* Tool Execution State */
.tool-header {
    margin-bottom: 24px;
    text-align: center;
}

.tool-controls {
    width: 100%;
    max-width: 500px;
    background: white;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--border);
    margin-bottom: 24px;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #f1f5f9;
    border-radius: 100px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.3s ease;
}

.action-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-secondary {
    background: white;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary:hover {
    background: #f8fafc;
}