/* ═══════════════════════════════════════════════════════════════
   AGENT STUDIO v1.0 — Vyoma AI Agent Showcase & Studio Modal
   Premium glassmorphism cards with gradient borders
   ═══════════════════════════════════════════════════════════════ */

/* ─── FLOATING "Explore Agents" BUTTON (inside Explore Models) ─ */
.agent-studio-float-btn {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 220;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px;
    border-radius: 16px;
    background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
    background-size: 200% 200%;
    animation: agStudioGlow 4s ease infinite;
    border: none;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 650;
    font-family: 'Inter', system-ui, sans-serif;
    cursor: pointer;
    letter-spacing: -0.2px;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.agent-studio-float-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.agent-studio-float-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.agent-studio-float-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

@keyframes agStudioGlow {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* ─── STUDIO MODAL OVERLAY ─────────────────────────────────── */
.agent-studio-overlay {
    position: fixed;
    inset: 0;
    z-index: 280;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.agent-studio-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.agent-studio-modal {
    width: 720px;
    max-width: 94vw;
    max-height: 85vh;
    background: rgba(18, 18, 22, 0.94);
    backdrop-filter: blur(60px) saturate(1.6);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 24px;
    box-shadow: 0 32px 100px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
    transform: translateY(20px) scale(0.96);
    opacity: 0;
    transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.agent-studio-overlay.open .agent-studio-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* ─── Header ──────────────────────────────────────────────── */
.agent-studio-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.agent-studio-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.agent-studio-logo {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(168, 85, 247, 0.10));
    border: 1px solid rgba(99, 102, 241, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.agent-studio-logo svg {
    width: 20px;
    height: 20px;
    color: #a78bfa;
}

.agent-studio-heading {
    font-size: 1.1rem;
    font-weight: 700;
    color: #f0f0f3;
    letter-spacing: -0.3px;
}

.agent-studio-sub {
    font-size: 0.68rem;
    color: rgba(161, 161, 170, 0.45);
    margin-top: 1px;
}

.agent-studio-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    color: rgba(161, 161, 170, 0.5);
    cursor: pointer;
    transition: all 0.2s;
}

.agent-studio-close svg {
    width: 15px;
    height: 15px;
}

.agent-studio-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #e4e4e7;
}

/* ─── Body / Grid ─────────────────────────────────────────── */
.agent-studio-body {
    padding: 20px 24px 28px;
    overflow-y: auto;
    max-height: 65vh;
    scrollbar-width: none;
}

.agent-studio-body::-webkit-scrollbar {
    display: none;
}

.agent-studio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

/* ─── AGENT CARD (gradient border, glow) ──────────────────── */
.agent-studio-card {
    position: relative;
    border-radius: 18px;
    padding: 24px 20px;
    background: rgba(22, 22, 26, 0.8);
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.agent-studio-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 18px;
    padding: 1.5px;
    background: linear-gradient(135deg, var(--card-grad-1, #6366f1), var(--card-grad-2, #a855f7));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.agent-studio-card:hover::before {
    opacity: 1;
}

.agent-studio-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.12);
}

/* Card color variants */
.agent-studio-card.gmail-card {
    --card-grad-1: #f87171;
    --card-grad-2: #fb923c;
}

.agent-studio-card.drive-card {
    --card-grad-1: #34d399;
    --card-grad-2: #2dd4bf;
}

.agent-studio-card.calendar-card {
    --card-grad-1: #818cf8;
    --card-grad-2: #a78bfa;
}

.agent-card-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.agent-card-icon-wrap svg {
    width: 22px;
    height: 22px;
}

.gmail-card .agent-card-icon-wrap {
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
}

.drive-card .agent-card-icon-wrap {
    background: rgba(52, 211, 153, 0.1);
    color: #34d399;
}

.calendar-card .agent-card-icon-wrap {
    background: rgba(129, 140, 248, 0.1);
    color: #818cf8;
}

.agent-card-name {
    font-size: 0.92rem;
    font-weight: 650;
    color: #f0f0f3;
    margin-bottom: 6px;
    letter-spacing: -0.2px;
}

.agent-card-features {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
}

.agent-card-features li {
    font-size: 0.68rem;
    color: rgba(161, 161, 170, 0.5);
    padding: 2px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.agent-card-features li::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
    opacity: 0.5;
}

/* Card status & button */
.agent-card-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.65rem;
    margin-bottom: 14px;
}

.agent-card-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.agent-card-status-dot.connected {
    background: #34d399;
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.5);
}

.agent-card-status-dot.disconnected {
    background: #52525b;
}

.agent-card-status-label {
    font-weight: 500;
    color: rgba(161, 161, 170, 0.6);
}

.agent-card-status-label.connected {
    color: #34d399;
}

.agent-card-btn {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: 'Inter', system-ui, sans-serif;
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
}

.agent-card-btn.open-btn {
    background: rgba(99, 102, 241, 0.12);
    color: #818cf8;
    border-color: rgba(99, 102, 241, 0.2);
}

.agent-card-btn.open-btn:hover {
    background: rgba(99, 102, 241, 0.2);
}

.agent-card-btn.connect-btn {
    background: transparent;
    color: rgba(161, 161, 170, 0.6);
    border-color: rgba(255, 255, 255, 0.06);
}

.agent-card-btn.connect-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #e4e4e7;
}

/* ─── AGENTS SHOWCASE PAGE ─────────────────────────────────── */
.agents-page-overlay {
    position: fixed;
    inset: 0;
    z-index: 240;
    background: rgba(12, 12, 16, 0.98);
    backdrop-filter: blur(30px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    overflow-y: auto;
}

.agents-page-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.agents-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

.agents-page-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.agents-page-back {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    color: #a1a1aa;
    cursor: pointer;
    transition: all 0.2s;
}

.agents-page-back:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #e4e4e7;
}

.agents-page-back svg {
    width: 16px;
    height: 16px;
}

.agents-page-hero {
    text-align: center;
    margin-bottom: 40px;
}

.agents-page-hero-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(168, 85, 247, 0.10));
    border: 1px solid rgba(99, 102, 241, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.agents-page-hero-icon svg {
    width: 28px;
    height: 28px;
    color: #a78bfa;
}

.agents-page-hero h1 {
    font-size: 1.6rem;
    font-weight: 750;
    color: #f0f0f3;
    letter-spacing: -0.5px;
    margin: 0 0 8px;
}

.agents-page-hero p {
    font-size: 0.88rem;
    color: rgba(161, 161, 170, 0.5);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.5;
}

.agents-page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

/* ─── LARGE AGENT CARD (for showcase page) ─────────────────── */
.agent-showcase-card {
    position: relative;
    border-radius: 22px;
    padding: 28px 24px;
    background: rgba(22, 22, 26, 0.7);
    cursor: default;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.agent-showcase-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 22px;
    padding: 1.5px;
    background: linear-gradient(135deg, var(--card-grad-1, #6366f1), var(--card-grad-2, #a855f7));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.4;
    transition: opacity 0.3s;
}

.agent-showcase-card:hover::before {
    opacity: 0.8;
}

.agent-showcase-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.2);
}

.agent-showcase-card.gmail-card {
    --card-grad-1: #f87171;
    --card-grad-2: #fb923c;
}

.agent-showcase-card.drive-card {
    --card-grad-1: #34d399;
    --card-grad-2: #2dd4bf;
}

.agent-showcase-card.calendar-card {
    --card-grad-1: #818cf8;
    --card-grad-2: #a78bfa;
}

.agent-showcase-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.agent-showcase-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.agent-showcase-icon svg {
    width: 24px;
    height: 24px;
}

.gmail-card .agent-showcase-icon {
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
}

.drive-card .agent-showcase-icon {
    background: rgba(52, 211, 153, 0.1);
    color: #34d399;
}

.calendar-card .agent-showcase-icon {
    background: rgba(129, 140, 248, 0.1);
    color: #818cf8;
}

.agent-showcase-name {
    font-size: 1.05rem;
    font-weight: 680;
    color: #f0f0f3;
    margin-bottom: 4px;
    letter-spacing: -0.2px;
}

.agent-showcase-tagline {
    font-size: 0.74rem;
    color: rgba(161, 161, 170, 0.45);
    margin-bottom: 16px;
}

.agent-showcase-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

.agent-showcase-features li {
    font-size: 0.74rem;
    color: rgba(228, 228, 231, 0.6);
    padding: 5px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.agent-showcase-features li span.feat-icon {
    font-size: 0.85rem;
    flex-shrink: 0;
}

.agent-showcase-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.agent-showcase-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    font-weight: 500;
}

.agent-showcase-btn {
    padding: 10px 22px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Inter', system-ui, sans-serif;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
}

.agent-showcase-btn.explore-btn {
    background: linear-gradient(135deg, var(--card-grad-1), var(--card-grad-2));
    color: #fff;
    box-shadow: 0 4px 18px rgba(99, 102, 241, 0.2);
}

.agent-showcase-btn.explore-btn:hover {
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
}

/* ─── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 600px) {
    .agent-studio-modal {
        width: 96vw;
        border-radius: 18px;
    }

    .agent-studio-grid {
        grid-template-columns: 1fr;
    }

    .agents-page-grid {
        grid-template-columns: 1fr;
    }

    .agents-page-hero h1 {
        font-size: 1.25rem;
    }

    .agent-studio-float-btn {
        bottom: 18px;
        right: 18px;
        padding: 12px 20px;
        font-size: 0.82rem;
    }
}