/* Chat, pricing modal, service CTAs */
.description {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

.btn-ver-precios {
    font-size: 13px;
    font-weight: 600;
    color: white;
    background: var(--text-blue);
    padding: 10px 18px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    align-self: flex-start;
    margin-top: auto;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-ver-precios:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
    box-shadow: 0 4px 12px rgba(91, 104, 246, 0.3);
}

.ai-panel .chat-container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.chat-history {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.message-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    max-width: 95%;
}

.user-row {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--text-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
    font-weight: bold;
}

.user-row .avatar {
    display: none;
}

.message-content {
    background: #ffffff;
    padding: 16px 20px;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    font-size: 15px;
    line-height: 1.6;
    color: #1f2937;
}

.user-row .message-content {
    background: #e5e7eb;
    border-radius: 16px;
    border-bottom-right-radius: 4px;
    box-shadow: none;
}

.loading-indicator {
    display: none;
    align-items: center;
    gap: 5px;
    padding-left: 56px;
    margin-top: 10px;
}

.dot {
    width: 6px;
    height: 6px;
    background: var(--text-blue);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.dot:nth-child(1) {
    animation-delay: -0.32s;
}

.dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.chat-box {
    background: #ffffff;
    border-radius: 24px;
    padding: 20px 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 150px;
}

.chat-input-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-grow: 1;
    padding-top: 10px;
}

.icon-sparkle-main {
    color: #7b8afb;
    width: 24px;
    height: 24px;
    margin-top: 2px;
    flex-shrink: 0;
}

.chat-box textarea {
    width: 100%;
    border: none;
    outline: none;
    resize: none;
    font-size: 1.1rem;
    font-family: inherit;
    color: var(--text-dark);
    background: transparent;
    min-height: 60px;
    padding: 0;
    line-height: 1.5;
}

.chat-box textarea::placeholder {
    color: #a0aab5;
}

.chat-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tools-left {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.chat-box button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-pill {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    background: white;
    color: #475569;
    font-size: 0.9rem;
    font-weight: 500;
    gap: 6px;
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-pill:hover {
    background: #f1f5f9;
}

.btn-pill svg {
    width: 16px;
    height: 16px;
    color: #64748b;
}

.btn-send-new {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #94a3b8;
    transition: 0.2s;
    flex-shrink: 0;
}

.btn-send-new:hover {
    background: var(--text-blue);
    color: white;
}

.btn-send-new svg {
    width: 20px;
    height: 20px;
}

#pricing-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.5);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#pricing-modal.active {
    display: flex;
    opacity: 1;
}

.modal-content-wrapper {
    background: #f8fafc;
    width: 100%;
    max-width: 1250px;
    max-height: 95vh;
    border-radius: 24px;
    position: relative;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

#pricing-modal.active .modal-content-wrapper {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    border: none;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1010;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: #64748b;
    transition: all 0.2s;
}

.close-modal:hover {
    background: #f1f5f9;
    color: #0f172a;
}

#plan-detail-view {
    transition: all 0.4s ease;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    border-top: 1px solid #e5e7eb;
    margin-top: 0;
}

#plan-detail-view.visible {
    max-height: 1200px;
    opacity: 1;
    margin-top: 40px;
    padding-top: 40px;
}

.chat-box,
.message-content {
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

html.dark .description,
html.dark .glass-card .description {
    color: #f8fafc;
    font-weight: 400;
}

html.dark .glass-card h4.text-gradient {
    background: linear-gradient(90deg, #ff6699 0%, #c084fc 35%, #ffffff 50%, #c084fc 65%, #60a5fa 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: auroraRespiracion 10s ease-in-out infinite;
    filter: drop-shadow(0 0 6px rgba(192, 132, 252, 0.4));
}

@keyframes auroraRespiracion {
    0% { background-position: 0% center; }
    50% { background-position: 100% center; }
    100% { background-position: 0% center; }
}

html.dark .chat-box,
html.dark .bg-slate-50,
html.dark .bg-white {
    background: rgba(30, 41, 59, 0.7) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
}

html.dark .message-content {
    background: rgba(51, 65, 85, 0.9) !important;
    color: #f8fafc !important;
}

html.dark .user-row .message-content {
    background: var(--text-blue) !important;
    color: #ffffff !important;
}

html.dark .chat-box textarea {
    color: #f8fafc;
}

html.dark .chat-box textarea::placeholder {
    color: #64748b;
}

html.dark .btn-pill {
    background: rgba(30, 41, 59, 0.8);
    border-color: #475569;
    color: #cbd5e1;
    transition: all 0.3s ease;
}

html.dark .btn-pill:hover {
    background: rgba(91, 104, 246, 0.25) !important;
    color: #ffffff !important;
    border-color: #5b68f6 !important;
    box-shadow: 0 0 15px rgba(91, 104, 246, 0.3) !important;
}

html.dark .btn-send-new {
    background: #334155;
    color: #94a3b8;
}

html.dark .btn-send-new:hover {
    background: var(--text-blue) !important;
    color: white !important;
    box-shadow: 0 0 15px rgba(91, 104, 246, 0.4) !important;
}

html.dark .modal-content-wrapper {
    background: #0f172a;
}

html.dark .close-modal {
    background: #1e293b;
    color: #94a3b8;
}

html.dark .close-modal:hover {
    background: #334155;
    color: white;
}

html.dark #pricing-modal {
    background: rgba(0, 0, 0, 0.8);
}

html.dark .border-slate-200,
html.dark .border-slate-100 {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

html.dark .bg-slate-800 {
    background: rgba(255, 255, 255, 0.05) !important;
}

html.dark .text-slate-300 {
    color: #94a3b8 !important;
}

html.dark #pricing-modal button.border-slate-200 {
    background: transparent !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #cbd5e1 !important;
    transition: all 0.3s ease !important;
}

html.dark #pricing-modal button.border-slate-200:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

html.dark #pricing-modal button.bg-white {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #f8fafc !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.3s ease !important;
}

html.dark #pricing-modal button.bg-white:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    transform: scale(1.02);
}

html.dark #pricing-modal button.bg-blue-500:hover,
html.dark #plan-detail-view a:hover {
    filter: brightness(1.2);
    box-shadow: 0 0 20px rgba(91, 104, 246, 0.4) !important;
}

html.dark #plan-detail-view a.bg-slate-900 {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

html.dark #plan-detail-view a.bg-slate-900:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* ——— Branding modal (Diseño IA) ——— */
#modal-title-text {
    color: #0f172a;
}

#modal-subtitle-text {
    color: #64748b;
}

.portfolio-marquee {
    width: 100%;
    overflow: hidden;
    padding: 12px 0 20px;
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.portfolio-track {
    display: flex;
    width: max-content;
    gap: 24px;
    align-items: center;
    animation: brandingMarquee 40s linear infinite;
}

.portfolio-marquee:hover .portfolio-track {
    animation-play-state: paused;
}

.portfolio-item {
    height: 260px;
    width: auto;
    max-width: min(340px, 72vw);
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.portfolio-marquee .portfolio-item:hover {
    transform: scale(1.03);
    box-shadow: 0 16px 36px rgba(91, 104, 246, 0.22);
}

@keyframes brandingMarquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

#view-branding .branding-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

#view-branding .branding-disclaimer {
    color: #94a3b8;
}

#view-branding .branding-footer {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
}

#view-branding .branding-eyebrow {
    color: #94a3b8;
}

#view-branding .branding-lead {
    color: #475569;
}

#view-branding .branding-pricing {
    border-color: #e2e8f0;
}

#view-branding .branding-price {
    color: #5b68f6;
}

#view-branding .branding-rate {
    color: #64748b;
}

#view-branding .branding-cta {
    background: #5b68f6;
    color: #ffffff;
    box-shadow: 0 10px 28px rgba(91, 104, 246, 0.28);
}

#view-branding .branding-cta:hover {
    background: #4f5ce8;
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(91, 104, 246, 0.38);
}

html.dark #modal-title-text {
    color: #f8fafc !important;
}

html.dark #modal-subtitle-text {
    color: #94a3b8 !important;
}

html.dark #view-branding .branding-card {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.35);
}

html.dark #view-branding .branding-disclaimer {
    color: #64748b;
}

html.dark #view-branding .branding-footer {
    background: rgba(15, 23, 42, 0.55);
    border-color: rgba(255, 255, 255, 0.08);
}

html.dark #view-branding .branding-eyebrow {
    color: #64748b;
}

html.dark #view-branding .branding-lead {
    color: #cbd5e1;
}

html.dark #view-branding .branding-pricing {
    border-color: rgba(255, 255, 255, 0.1);
}

html.dark #view-branding .branding-price {
    color: #a5b4fc;
}

html.dark #view-branding .branding-rate {
    color: #94a3b8;
}

html.dark .portfolio-item {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

html.dark .portfolio-marquee .portfolio-item:hover {
    box-shadow: 0 18px 40px rgba(129, 140, 248, 0.28);
}

html.dark #view-branding .branding-cta {
    background: #5b68f6;
    color: #ffffff;
    box-shadow: 0 10px 28px rgba(91, 104, 246, 0.35);
}

html.dark #view-branding .branding-cta:hover {
    background: #6366f1;
    box-shadow: 0 14px 36px rgba(99, 102, 241, 0.45);
}

@media (max-width: 767px) {
    .portfolio-item {
        height: 200px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .portfolio-track {
        animation: none;
    }
}
