/* =========================================================
   Goedly - AI Showcase Section: Meet Alex
   Gmail-style email client mockups for each scenario
   ========================================================= */

/* Section wrapper */
.ai-showcase-section {
    padding: var(--space-3xl) 0;
    background: var(--bg);
}

.ai-showcase-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--space-2xl);
    align-items: start;
}

@media (max-width: 992px) {
    .ai-showcase-container {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   Tab Navigation
   ========================================================= */

.ai-tabs-nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    position: sticky;
    top: 100px;
}

.ai-tab-btn {
    background: var(--bg-soft);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    text-align: left;
    cursor: pointer;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    border-left: 3px solid transparent;
}

.ai-tab-btn:hover {
    border-color: var(--business-primary);
    border-left-color: var(--business-primary);
    background: var(--bg);
}

.ai-tab-btn.active {
    background: var(--bg);
    border-color: var(--business-primary);
    border-left: 4px solid var(--business-primary);
    box-shadow: var(--shadow-lg);
}

.ai-tab-icon-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.ai-tab-icon-row i {
    font-size: 14px;
    color: var(--text-secondary);
    width: 16px;
    text-align: center;
}

.ai-tab-btn.active .ai-tab-icon-row i {
    color: var(--business-primary);
}

.ai-tab-btn h3 {
    font-size: var(--text-base);
    font-weight: var(--font-weight-bold);
    margin: 0 0 3px 0;
    color: var(--text);
}

.ai-tab-btn p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0;
    line-height: var(--line-height-normal);
}

/* =========================================================
   Mockup Display Container
   ========================================================= */

.ai-mockup-display {
    background: #d8e0e8;
    background-image: radial-gradient(circle, #b8c4cc 1px, transparent 1px);
    background-size: 18px 18px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    position: relative;
    padding: 20px;
    overflow: hidden;
}

.ai-content-pane {
    display: none;
    animation: showcaseFadeIn 0.35s ease-out;
}

.ai-content-pane.active {
    display: block;
}

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

/* =========================================================
   Email Window (macOS Chrome)
   ========================================================= */

.email-window {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow:
        0 28px 80px rgba(0, 0, 0, 0.18),
        0 12px 32px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.06);
}

.window-chrome {
    background: linear-gradient(180deg, #ebebeb 0%, #e0e0e0 100%);
    height: 36px;
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 14px;
    border-bottom: 1px solid #c8c8c8;
    flex-shrink: 0;
}

.traffic-lights {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
}

.tl {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tl.red    { background: #ff5f57; box-shadow: inset 0 0 0 0.5px rgba(0,0,0,0.12); }
.tl.yellow { background: #febc2e; box-shadow: inset 0 0 0 0.5px rgba(0,0,0,0.12); }
.tl.green-dot { background: #28c840; box-shadow: inset 0 0 0 0.5px rgba(0,0,0,0.12); }

.window-address-bar {
    flex: 1;
    background: rgba(0, 0, 0, 0.07);
    border-radius: 5px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    font-size: 11px;
    color: #444;
    margin: 0 18px;
    letter-spacing: 0.01em;
}

/* =========================================================
   Gmail 3-Column Layout
   ========================================================= */

.gmail-layout {
    display: grid;
    grid-template-columns: 58px 192px 1fr;
    height: 460px;
    overflow: hidden;
}

/* Left sidebar */
.gmail-sidebar {
    background: #f6f8fc;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0 8px;
    gap: 4px;
    flex-shrink: 0;
}

.gmail-compose-btn {
    width: 40px;
    height: 40px;
    background: #e8f0fe;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    cursor: pointer;
    flex-shrink: 0;
}

.gmail-compose-btn i {
    color: #1a73e8;
    font-size: 13px;
}

.gmail-nav-item {
    width: 40px;
    height: 40px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}

.gmail-nav-item i {
    font-size: 17px;
    color: #444746;
}

.gmail-nav-item.active {
    background: #d3e3fd;
}

.gmail-nav-item.active i {
    color: #001d35;
}

.unread-badge {
    position: absolute;
    top: 5px;
    right: 4px;
    background: #d93025;
    color: white;
    font-size: 9px;
    font-weight: 700;
    min-width: 14px;
    height: 14px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
}

/* Thread list column */
.gmail-thread-list {
    background: #f6f8fc;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
    overflow-x: hidden;
}

.gmail-thread-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 8px;
    cursor: pointer;
    border-bottom: 1px solid #eeeeee;
    min-width: 0;
}

.gmail-thread-item.selected {
    background: #d3e3fd;
}

.thread-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: white;
}

.thread-avatar.alex {
    background: white;
    padding: 3px;
    overflow: hidden;
    box-shadow: 0 0 0 2px var(--business-primary);
}

.thread-avatar.alex img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.thread-avatar.user-y { background: #757575; }
.thread-avatar.user-s { background: #c0392b; }
.thread-avatar.user-m { background: #e67e22; }

.thread-info {
    flex: 1;
    min-width: 0;
}

.thread-sender-name {
    font-size: 12px;
    font-weight: 400;
    color: #5f6368;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.gmail-thread-item.unread .thread-sender-name {
    font-weight: 700;
    color: #202124;
}

.thread-subject-preview {
    font-size: 11px;
    color: #5f6368;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.gmail-thread-item.unread .thread-subject-preview {
    font-weight: 600;
    color: #202124;
}

.thread-time {
    font-size: 10px;
    color: #5f6368;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 2px;
    white-space: nowrap;
}

.gmail-thread-item.unread .thread-time {
    font-weight: 700;
    color: #202124;
}

/* =========================================================
   Email Detail View
   ========================================================= */

.gmail-detail {
    background: #ffffff;
    overflow-y: auto;
    padding: 16px 18px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.gmail-detail::-webkit-scrollbar {
    width: 6px;
}

.gmail-detail::-webkit-scrollbar-thumb {
    background: #dadce0;
    border-radius: 3px;
}

.detail-subject-line {
    font-size: 16px;
    font-weight: 700;
    color: #202124;
    margin-bottom: 10px;
    line-height: 1.3;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

/* Individual message in thread */
.email-message {
    padding: 12px 0;
    border-bottom: 1px solid #f4f4f4;
}

.email-message:last-child {
    border-bottom: none;
}

.msg-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.msg-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: white;
}

.msg-avatar.alex {
    background: white;
    padding: 3px;
    overflow: hidden;
    box-shadow: 0 0 0 2px var(--business-primary);
}

.msg-avatar.alex img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.msg-avatar.user-y { background: #757575; }
.msg-avatar.user-s { background: #c0392b; }
.msg-avatar.user-m { background: #e67e22; }

.msg-meta {
    flex: 1;
    min-width: 0;
}

.msg-sender-name {
    font-size: 13px;
    font-weight: 600;
    color: #202124;
}

.msg-sender-email {
    font-size: 11px;
    color: #5f6368;
    font-weight: 400;
    margin-left: 4px;
}

.msg-time {
    font-size: 11px;
    color: #5f6368;
    flex-shrink: 0;
    margin-top: 3px;
    white-space: nowrap;
}

.msg-fields {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 3px;
}

.msg-field-row {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.msg-field-label {
    font-size: 11px;
    color: #9aa0a6;
    min-width: 18px;
}

/* Address chips (To/CC recipients) */
.email-address-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #f1f3f4;
    border-radius: 99px;
    padding: 1px 8px;
    font-size: 11px;
    color: #3c4043;
    white-space: nowrap;
}

.email-address-chip.alex {
    background: var(--business-primary);
    color: white;
    font-weight: 700;
    padding: 2px 8px 2px 4px;
    font-size: 11px;
}

.email-address-chip.alex img {
    width: 14px;
    height: 14px;
    object-fit: contain;
    flex-shrink: 0;
}

/* Email body text */
.msg-body {
    font-size: 13px;
    color: #3c4043;
    line-height: 1.65;
    padding: 0 2px;
}

/* Action buttons inside emails */
.msg-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.alex-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.18s ease;
    line-height: 1;
}

.alex-action-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.alex-action-btn.primary {
    background: var(--business-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.alex-action-btn.secondary {
    background: #f1f3f4;
    color: #3c4043;
    border: 1px solid #dadce0;
}

/* =========================================================
   Post Card (Blog Sync Tab)
   ========================================================= */

.post-card {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-left: 3px solid var(--business-primary);
    border-radius: 6px;
    padding: 12px 14px;
    margin: 10px 0 4px;
}

.post-card-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--business-primary);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 99px;
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-card-title {
    font-size: 13px;
    font-weight: 700;
    color: #202124;
    margin-bottom: 4px;
    line-height: 1.4;
}

.post-card-preview {
    font-size: 11px;
    color: #5f6368;
    line-height: 1.55;
    margin-bottom: 8px;
}

.post-card-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--business-primary);
    font-weight: 600;
    text-decoration: none;
}

.post-card-link:hover {
    text-decoration: underline;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1100px) {
    .gmail-layout {
        grid-template-columns: 48px 168px 1fr;
    }
}

@media (max-width: 992px) {
    .gmail-layout {
        grid-template-columns: 48px 1fr;
        height: 400px;
    }

    .gmail-thread-list {
        display: none;
    }
}

@media (max-width: 600px) {
    .gmail-layout {
        grid-template-columns: 1fr;
        height: 360px;
    }

    .gmail-sidebar {
        display: none;
    }

    .window-chrome {
        height: 28px;
    }

    .tl {
        width: 10px;
        height: 10px;
    }
}

/* =========================================================
   Alex CTA Strip
   ========================================================= */

.alex-cta-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.alex-cta-text {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.alex-cta-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-sm);
    font-weight: var(--font-weight-bold);
    color: var(--business-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.alex-cta-link:hover {
    opacity: 0.75;
}
