/* ==================== */
/* ChatGPT Tab Styles */
/* ==================== */
.chatgpt-layout {
    display: flex;
    height: 100%;
}

.chatgpt-sidebar {
    width: 231px;
    background: linear-gradient(180deg, #f8f9fa 0%, #f3f4f6 100%);
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    padding: 16px;
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 24px;
}

.sidebar-btn {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-btn:hover {
    background: rgba(79, 70, 229, 0.08);
    color: #4f46e5;
    transform: translateX(2px);
}

.sidebar-heading {
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding: 0 12px;
}

.conversation-item {
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 4px;
    border-left: 3px solid transparent;
}

.conversation-item:hover {
    background: rgba(255, 255, 255, 0.8);
    border-left-color: #4f46e5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transform: translateX(2px);
}

.conv-title {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 4px;
}

.conv-preview {
    display: block;
    font-size: 12px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chatgpt-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state {
    text-align: center;
    color: #666;
    padding: 60px 40px;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(79, 70, 229, 0.02) 100%);
    border-radius: 24px;
    border: 1px dashed rgba(79, 70, 229, 0.2);
    max-width: 500px;
}

.empty-state::before {
    content: '💬';
    display: block;
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.8;
}

.empty-state h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

.empty-state p {
    font-size: 14px;
    margin-bottom: 16px;
    color: #888;
    line-height: 1.6;
}

.active-tab-label {
    font-size: 12px;
    color: #4f46e5;
}

.chat-input-container {
    padding: 16px 40px 24px;
    border-top: 1px solid #e5e5e5;
}

.chat-input-wrapper,
.agent-input-wrapper,
.notification-input {
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #f6f7f8 0%, #eff0f2 100%);
    border-radius: 24px;
    padding: 14px 18px 12px 18px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.04),
        0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-input-wrapper:focus-within,
.agent-input-wrapper:focus-within,
.notification-input:focus-within {
    border-color: rgba(79, 70, 229, 0.3);
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.04),
        0 0 0 3px rgba(79, 70, 229, 0.1);
}

.chat-input,
.agent-input,
.reply-input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 0 0 10px 0;
    font-size: 16px;
    outline: none;
    color: var(--color-text);
}

.chat-input::placeholder,
.agent-input::placeholder,
.reply-input::placeholder {
    color: #6b6b6b;
}

.toolbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toolbar-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 20px;
    color: #6b6b6b;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.toolbar-btn:hover {
    background: rgba(79, 70, 229, 0.08);
    color: #4f46e5;
    transform: scale(1.1);
}

.toolbar-label {
    font-size: 15px;
    color: #6b6b6b;
    font-weight: 400;
}

.send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: white;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 2px 8px rgba(79, 70, 229, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.send-btn:hover {
    background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
    transform: scale(1.08);
    box-shadow:
        0 4px 12px rgba(79, 70, 229, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.send-btn:active {
    transform: scale(0.95);
}

/* ==================== */
/* Tools Tab Styles    */
/* ==================== */
/* .tools-layout defined in tool grid section below */

/* Business Tools locked panel */
.business-tools-locked {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 48px 40px;
}

.locked-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.9;
}

.locked-ava {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
}

.locked-ava-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-top: 8px;
}

.locked-ava-avatar {
    width: 140px;
    height: 172px;
    border-radius: 20px;
    object-fit: cover;
    background: var(--color-bg);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border: 3px solid white;
}

.locked-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 10px;
}

.locked-subtitle {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.6;
    max-width: 420px;
    margin-bottom: 28px;
}

.locked-mailing {
    display: flex;
    gap: 10px;
    max-width: 400px;
    width: 100%;
}

.locked-email-input {
    flex: 1;
    padding: 12px 16px;
    font-size: 14px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: var(--color-bg);
}

.locked-email-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.locked-email-input::placeholder {
    color: var(--color-text-faint);
}

.locked-join-btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    white-space: nowrap;
}

.locked-join-btn:hover {
    background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

.locked-join-btn.joined {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    pointer-events: none;
}

.agent-avatar {
    width: 56px;
    height: 70px;
    border-radius: 12px;
    object-fit: cover;
    margin-right: 12px;
}

/* Agent icon (for non-personalized agents like Legal, Leasing, etc.) */
.agent-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 50%;
    margin-right: 12px;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.agent-initial {
    font-size: 16px;
    font-weight: 600;
    color: #4b5563;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.5px;
}

/* Ava avatar - cropped from bottom for portrait image, shifted right to center face */
.agent-avatar.ava-avatar {
    object-position: 55% top;
}

/* Agent sidebar separator */
.agent-separator {
    display: none;
}

.agent-name {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text);
}

.agent-arrow {
    color: #999;
    font-size: 18px;
}

/* Tools tab layout — flat scrollable list of tool grids */
/* ── Tools Flip Container (3D flip: My Tools / All Tools) ── */
.tools-flip-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tools-flip-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0 0;
    margin-bottom: 8px;
    flex-shrink: 0;
    position: relative;
}

.tools-flip-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.tools-flip-label {
    font-size: 19px;
    color: var(--color-text-muted);
    letter-spacing: 0.02em;
}

.tools-flipper {
    position: relative;
    flex: 1;
    min-height: 0;
}

.tools-flip-front {
    display: none;
}

.tools-flip-back {
    height: calc(100% - 16px);
    overflow-y: auto;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: var(--shadow-card);
    margin: 0 20px 16px;
}


.tools-layout {
    height: 100%;
    padding: 16px 20px;
    overflow-y: auto;
    background: transparent;
    box-sizing: border-box;
}

.tools-section {
    display: block;
    margin-bottom: 32px;
}

.tools-section:last-child {
    margin-bottom: 0;
}

.message {
    display: flex;
    margin-bottom: 24px;
    max-width: 800px;
}

.user-message {
    justify-content: flex-end;
}

.user-message .message-content {
    background: linear-gradient(135deg, rgba(224, 231, 255, 0.8) 0%, rgba(199, 210, 254, 0.6) 100%);
    padding: 12px 16px;
    border-radius: 18px 18px 4px 18px;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.08);
    border: 1px solid rgba(79, 70, 229, 0.1);
}

.agent-message {
    align-items: flex-start;
}

.message-avatar {
    width: 56px;
    height: 70px;
    border-radius: 12px;
    object-fit: cover;
    margin-right: 16px;
    flex-shrink: 0;
    display: none; /* Hide avatars in chat messages */
}

/* Message icon (for non-personalized agents in chat) */
.message-icon {
    width: 48px;
    height: 48px;
    display: none; /* Hide icons in chat messages */
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: var(--color-bg-muted);
    border-radius: 50%;
    margin-right: 16px;
    flex-shrink: 0;
}

.agent-message .message-content {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    padding: 16px 20px;
    border-radius: 4px 18px 18px 18px;
    font-size: 14px;
    flex: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.agent-message .message-content p {
    margin-bottom: 12px;
}

.agent-message .message-content p:last-child {
    margin-bottom: 0;
}

.agent-message .message-content ul {
    margin: 8px 0 12px 20px;
}

.agent-message .message-content li {
    margin-bottom: 6px;
}

.agent-message .message-content h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 16px 0 8px;
    color: var(--color-text);
}

.document-link {
    display: inline-block;
    background: #f0f0f0;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    color: #666;
    margin: 8px 0;
}

/* .listing-preview — see polished version below */

.listing-preview h4 {
    margin-top: 0 !important;
}

.listing-preview p {
    font-size: 13px;
    color: #555;
}

.agent-input-container {
    padding: 16px 40px 24px;
    border-top: 1px solid #e5e5e5;
}

.agent-claude-input {
    padding: 16px 40px 24px;
    border-top: 1px solid #e5e5e5;
}

.agent-claude-input .claude-input-wrapper {
    max-width: none;
}

