/* ========== WILLISHOP – AGENT WORKSPACE STYLES (agent.css) – v22.1 FINAL ========== */
/* Professional, interactive, smooth transitions. Fully polished. */

#agentWorkspace {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #f5f7fa;
    z-index: 5000;
    font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
    color: #1e293b;
    overflow-y: auto;
}

#agentWorkspace * {
    box-sizing: border-box;
}

/* ---------- Top Bar ---------- */
#agentTopBar {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

#agentTopBar .agent-back-btn {
    background: none;
    border: none;
    font-size: 16px;
    color: #2563eb;
    cursor: pointer;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.2s;
}
#agentTopBar .agent-back-btn:hover {
    background: #eff6ff;
}

#agentTopBar .agent-title {
    font-size: 16px;
    font-weight: 600;
}

/* ---------- Screen transitions ---------- */
.agent-screen {
    display: none;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    padding: 24px;
}

.agent-screen.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Search Customer ---------- */
.agent-search-input {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #d1d5db;
    font-size: 16px;
    margin-bottom: 20px;
    background: white;
}

.agent-search-results {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.agent-search-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
.agent-search-card:hover {
    background: #f1f5f9;
    transform: scale(1.01);
}

.agent-search-card .agent-customer-name {
    font-weight: 600;
    font-size: 16px;
}

.agent-search-card .agent-customer-info {
    font-size: 14px;
    color: #64748b;
    margin-top: 4px;
}

/* ---------- Identity Verification ---------- */
.agent-verify-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.agent-verify-card .agent-verify-btn {
    margin-top: 16px;
    background: #2563eb;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

/* ---------- Customer Account View ---------- */
.agent-customer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.agent-customer-header .agent-customer-name {
    font-size: 20px;
    font-weight: 700;
}

.agent-customer-header .agent-customer-masked {
    font-size: 13px;
    color: #64748b;
}

.agent-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.agent-tab {
    background: #e2e8f0;
    border: none;
    border-radius: 20px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: #334155;
    transition: background 0.2s;
}
.agent-tab:hover {
    background: #cbd5e1;
}
.agent-tab.active {
    background: #2563eb;
    color: white;
}

.agent-tab-content {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Chat Layout ---------- */
.agent-chat-layout {
    display: flex;
    gap: 20px;
    height: calc(100vh - 100px);
}

.agent-chat-list {
    width: 280px;
    background: white;
    border-radius: 12px;
    overflow-y: auto;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.agent-chat-list-item {
    padding: 14px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.2s;
}
.agent-chat-list-item:hover {
    background: #f8fafc;
}

.agent-chat-list-item .agent-chat-name {
    font-weight: 600;
    font-size: 14px;
}

.agent-chat-list-item .agent-chat-preview {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

.agent-chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    overflow: hidden;
}

.agent-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.agent-chat-input-area {
    display: flex;
    padding: 12px;
    border-top: 1px solid #e2e8f0;
    gap: 8px;
}

.agent-chat-input-area input {
    flex: 1;
    border-radius: 20px;
    border: 1px solid #d1d5db;
    padding: 10px 16px;
    font-size: 14px;
}

/* ---------- BSP Dispute List ---------- */
.agent-dispute-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.agent-dispute-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: background 0.2s;
}
.agent-dispute-card:hover {
    background: #f1f5f9;
}

.agent-dispute-detail {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.agent-dispute-detail .agent-decision-btns {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.agent-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
    transition: background 0.2s, transform 0.1s;
}
.agent-btn:hover {
    background: #1d4ed8;
    transform: scale(1.02);
}

.agent-btn.secondary {
    background: transparent;
    border: 1px solid #2563eb;
    color: #2563eb;
}
.agent-btn.secondary:hover {
    background: #eff6ff;
}

.agent-btn.danger {
    background: #ef4444;
}
.agent-btn.danger:hover {
    background: #dc2626;
}

/* ---------- Edit forms ---------- */
.agent-form-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.agent-form-card input,
.agent-form-card textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 14px;
}

/* ---------- Warehouse Dashboard ---------- */
#agentScreen_warehouseDashboard .agent-btn {
    padding: 20px;
    text-align: center;
    font-size: 16px;
    border-radius: 12px;
}

/* ---------- Responsive ---------- */
@media (max-width:768px) {
    .agent-chat-layout {
        flex-direction: column;
        height: auto;
    }
    .agent-chat-list {
        width: 100%;
        max-height: 200px;
    }
}