/* AI Agent Demo Styles */

/* Z-index for intro/completion screens */
.z-60 {
    z-index: 60;
}

/* Intro Screen */
#intro-screen {
    transition: opacity 0.5s ease-out;
}

#intro-title,
#intro-scenario,
#intro-time,
#btn-start {
    transition: opacity 1s ease-out;
}

/* Tab Buttons */
.tab-btn {
    padding: 6px 12px;
    font-size: 13px;
    color: #9ca3af;
    background: transparent;
    border: none;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.tab-btn.active {
    color: #fff;
    background: #374151;
}

/* Tab Content */
.tab-content {
    display: none;
    position: absolute;
    inset: 0;
    background: #f9fafb;
    overflow-y: auto;
}

.tab-content.active {
    display: block;
}

/* Animated Cursor */
.agent-cursor {
    width: 24px;
    height: 24px;
    position: absolute;
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    transition: left 0.4s ease-out, top 0.4s ease-out, transform 0.1s, opacity 0.2s;
}

.agent-cursor::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-left: 12px solid #CDA052;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    transform: rotate(-45deg);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.agent-cursor::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 10px;
    width: 8px;
    height: 8px;
    background: #CDA052;
    border-radius: 50%;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s;
}

.agent-cursor.visible {
    opacity: 1;
}

.agent-cursor.clicking::after {
    opacity: 1;
    transform: scale(1.5);
}

/* Click Ripple Effect */
.click-ripple {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid #CDA052;
    border-radius: 50%;
    pointer-events: none;
    z-index: 999;
    opacity: 0;
    transform: scale(0);
}

.click-ripple.animate {
    animation: ripple 0.6s ease-out forwards;
}

@keyframes ripple {
    0% {
        opacity: 1;
        transform: scale(0);
    }
    100% {
        opacity: 0;
        transform: scale(2);
    }
}

/* Highlight Overlay */
.highlight-overlay {
    position: absolute;
    pointer-events: none;
    z-index: 998;
    border: 2px solid #CDA052;
    background: rgba(205, 160, 82, 0.1);
    border-radius: 4px;
    opacity: 0;
    transition: all 0.3s ease-out;
}

.highlight-overlay.visible {
    opacity: 1;
}

/* Email Inbox Styles */
.email-inbox {
    background: #fff;
    height: 100%;
}

.email-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.email-header h1 {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}

.email-compose-btn {
    background: #2563eb;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.email-list {
    padding: 0;
}

.email-item {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.email-item:hover {
    background: #f9fafb;
}

.email-item.unread {
    background: #eff6ff;
}

.email-item.unread:hover {
    background: #dbeafe;
}

.email-unread-dot {
    width: 8px;
    height: 8px;
    background: #2563eb;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.email-read-dot {
    width: 8px;
    height: 8px;
    background: transparent;
    margin-top: 6px;
    flex-shrink: 0;
}

.email-content {
    flex: 1;
    min-width: 0;
}

.email-sender {
    font-weight: 600;
    color: #111827;
    font-size: 14px;
}

.email-subject {
    color: #374151;
    font-size: 14px;
    margin-top: 2px;
}

.email-preview {
    color: #6b7280;
    font-size: 13px;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-time {
    color: #9ca3af;
    font-size: 12px;
    flex-shrink: 0;
}

/* Email Detail View */
.email-detail {
    display: none;
    height: 100%;
    background: #fff;
}

.email-detail.active {
    display: block;
}

.email-detail-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.email-back-btn {
    color: #2563eb;
    font-size: 14px;
    margin-bottom: 12px;
    cursor: pointer;
}

.email-detail-from {
    font-size: 14px;
    color: #6b7280;
}

.email-detail-from strong {
    color: #111827;
}

.email-detail-subject {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin-top: 8px;
}

.email-detail-body {
    padding: 20px;
    font-size: 15px;
    line-height: 1.7;
    color: #374151;
}

.email-detail-actions {
    padding: 16px 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
}

.email-action-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.email-action-btn.primary {
    background: #2563eb;
    color: white;
}

.email-action-btn.secondary {
    background: #f3f4f6;
    color: #374151;
}

.email-action-btn.sending {
    background: #3b82f6;
    opacity: 0.8;
}

.email-action-btn.sent {
    background: #16a34a !important;
    color: white;
}

/* Reply Composer */
.email-reply {
    display: none;
    padding: 20px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.email-reply.active {
    display: block;
}

.email-reply-header {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.email-reply-label {
    font-size: 13px;
    color: #6b7280;
    margin-right: 6px;
}

.email-reply-recipient {
    font-size: 14px;
    color: #111827;
    font-weight: 500;
}

.email-reply-body {
    width: 100%;
    min-height: 150px;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
    font-family: inherit;
    background: white;
    color: #111827;
    white-space: pre-wrap;
    overflow-y: auto;
}

.email-reply-actions {
    margin-top: 12px;
    display: flex;
    gap: 12px;
}

/* LinkedIn Styles - Realistic LinkedIn Look */
.linkedin-container {
    background: #f3f2ef;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* LinkedIn Header */
.linkedin-header {
    background: white;
    border-bottom: 1px solid #e0e0e0;
    padding: 0 16px;
    height: 52px;
    flex-shrink: 0;
}

.linkedin-header-inner {
    max-width: 1128px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    height: 100%;
    gap: 8px;
}

.linkedin-logo {
    flex-shrink: 0;
}

.linkedin-search-container {
    display: flex;
    align-items: center;
    background: #eef3f8;
    border-radius: 4px;
    padding: 0 8px;
    flex: 1;
    max-width: 280px;
    height: 34px;
}

.linkedin-search-icon {
    display: flex;
    align-items: center;
    margin-right: 8px;
}

.linkedin-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    outline: none;
    color: #333;
}

.linkedin-search-input::placeholder {
    color: #666;
}

.linkedin-search-btn {
    background: #0a66c2;
    border: none;
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
}

.linkedin-search-btn:hover {
    background: #004182;
}

.linkedin-nav-items {
    display: flex;
    gap: 24px;
    margin-left: auto;
}

.linkedin-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
    color: #666;
    cursor: pointer;
}

.linkedin-nav-item.active {
    color: #0a66c2;
}

.linkedin-nav-item span {
    margin-top: 2px;
}

/* LinkedIn Main Content */
.linkedin-main {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.linkedin-initial-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
}

.linkedin-initial-icon {
    margin-bottom: 16px;
}

.linkedin-initial-text {
    font-size: 16px;
}

/* LinkedIn Profile */
.linkedin-profile {
    display: none;
    max-width: 800px;
    margin: 0 auto;
}

.linkedin-profile.active {
    display: block;
}

.linkedin-profile-card,
.linkedin-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
    margin-bottom: 8px;
    overflow: hidden;
}

.linkedin-cover {
    height: 80px;
    background: linear-gradient(135deg, #0a66c2 0%, #004182 100%);
}

.linkedin-profile-content {
    padding: 16px;
    padding-top: 12px;
    display: flex;
    gap: 16px;
}

.linkedin-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 3px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -50px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.linkedin-avatar span {
    font-size: 28px;
    font-weight: 600;
    color: white;
}

.linkedin-profile-info {
    flex: 1;
}

.linkedin-name {
    font-size: 20px;
    font-weight: 600;
    color: #191919;
    margin: 0;
}

.linkedin-title {
    font-size: 14px;
    color: #191919;
    margin-top: 4px;
}

.linkedin-location {
    font-size: 13px;
    color: #666;
    margin-top: 2px;
}

.linkedin-connections {
    font-size: 13px;
    color: #666;
    margin-top: 4px;
}

.linkedin-connections-count {
    color: #0a66c2;
    font-weight: 600;
}

.linkedin-buttons {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.linkedin-btn-primary {
    background: #0a66c2;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.linkedin-btn-secondary {
    background: white;
    color: #0a66c2;
    border: 1px solid #0a66c2;
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.linkedin-card {
    padding: 16px;
}

.linkedin-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #191919;
    margin-bottom: 12px;
}

.linkedin-section-content {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

/* Experience */
.linkedin-experience-item {
    display: flex;
    gap: 12px;
}

.linkedin-company-logo {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.linkedin-experience-details {
    flex: 1;
}

.linkedin-experience-title {
    font-size: 14px;
    font-weight: 600;
    color: #191919;
}

.linkedin-company-name {
    font-size: 14px;
    color: #191919;
}

.linkedin-experience-meta {
    font-size: 13px;
    color: #666;
    margin-top: 2px;
}

.linkedin-company-info-tag {
    font-size: 13px;
    color: #0a66c2;
    margin-top: 4px;
    background: #e8f4fd;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

/* Education */
.linkedin-education-item {
    display: flex;
    gap: 12px;
}

.linkedin-school-logo {
    width: 48px;
    height: 48px;
    background: #8b0000;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.linkedin-education-details {
    flex: 1;
}

.linkedin-school-name {
    font-size: 14px;
    font-weight: 600;
    color: #191919;
}

.linkedin-degree {
    font-size: 14px;
    color: #191919;
}

.linkedin-education-year {
    font-size: 13px;
    color: #666;
    margin-top: 2px;
}

/* Calendar Styles */
.calendar-container {
    background: #fff;
    height: 100%;
    padding: 20px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-month {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.calendar-nav {
    display: flex;
    gap: 8px;
}

.calendar-nav-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.calendar-day-header {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

.calendar-timeline {
    margin-top: 12px;
}

.calendar-hour {
    display: flex;
    min-height: 48px;
    border-bottom: 1px solid #f3f4f6;
}

.calendar-hour-label {
    width: 60px;
    font-size: 12px;
    color: #6b7280;
    padding-top: 4px;
}

.calendar-hour-content {
    flex: 1;
    padding: 4px 8px;
}

.calendar-event {
    background: #dbeafe;
    border-left: 3px solid #2563eb;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
    color: #1e40af;
}

.calendar-available {
    background: #f0fdf4;
    border: 1px dashed #86efac;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
    color: #166534;
}

/* Typing cursor */
.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: #374151;
    animation: blink 0.8s infinite;
    vertical-align: text-bottom;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Responsive */
@media (max-width: 768px) {
    #demo-container {
        margin: 0;
        border-radius: 0;
        height: 100vh;
    }

    #browser-viewport {
        height: calc(100vh - 200px);
    }

    .tab-btn span {
        display: none;
    }
}
