/* Custom styles to enhance Tailwind CSS */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease forwards;
}

/* Debt Calculator Slider Styles */
.slider-track {
    height: 8px;
    background: #E2E8F0;
    border-radius: 4px;
}

.slider-track-active {
    background: #3B82F6;
}

.slider-handle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #3B82F6;
    border: 2px solid #FFFFFF;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

/* Form input focus styles */
.form-focus:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Custom tooltip */
.tooltip {
    position: relative;
}

.tooltip:hover::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: #1E3A8A;
    color: white;
    border-radius: 4px;
    white-space: nowrap;
    font-size: 14px;
    font-weight: normal;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tooltip:hover::after {
    content: '';
    position: absolute;
    bottom: calc(100% - 4px);
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #1E3A8A transparent transparent transparent;
    z-index: 10;
}

/* ElevenLabs Chat Button Animation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

#chat-with-abby {
    animation: pulse 2s infinite;
}

#chat-with-abby:hover {
    animation: none;
    transform: scale(1.05);
}

/* Abby Agent Styles */
.elevenlabs-agent-container {
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2) !important;
}

.elevenlabs-agent-header {
    background-color: #3B82F6 !important;
}

.elevenlabs-agent-button {
    background-color: #3B82F6 !important;
    transition: all 0.2s ease !important;
}

.elevenlabs-agent-button:hover {
    background-color: #2563EB !important;
}/* Help widget styling */
#ppt-help-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
}

#ppt-help-widget .ppt-help-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 9999px;
    background: var(--color-primary, #2563eb);
    color: #fff;
    border: none;
    box-shadow: 0 12px 24px rgba(23, 72, 196, 0.25);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#ppt-help-widget .ppt-help-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(23, 72, 196, 0.3);
}

#ppt-help-popup {
    position: absolute;
    bottom: 56px;
    right: 0;
    width: min(360px, calc(100vw - 32px));
    max-height: 70vh;
    overflow: hidden;
    display: none;
    background: var(--admin-card-bg, #ffffff);
    border: 1px solid var(--admin-card-border, rgba(148, 163, 184, 0.35));
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.35);
    color: var(--text-primary, #0f172a);
}

#ppt-help-popup .ppt-help-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--admin-card-border, rgba(148, 163, 184, 0.35));
    background: var(--admin-card-bg, #ffffff);
}

#ppt-help-popup .ppt-help-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #0f172a);
}

#ppt-help-popup .ppt-help-close {
    background: transparent;
    border: none;
    font-size: 20px;
    color: var(--text-secondary, #475569);
    cursor: pointer;
}

#ppt-help-popup .ppt-help-content {
    padding: 16px 20px;
    max-height: calc(70vh - 64px);
    overflow-y: auto;
    color: var(--text-secondary, #475569);
}

#ppt-help-popup .ppt-help-content::-webkit-scrollbar {
    width: 8px;
}

#ppt-help-popup .ppt-help-content::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.45);
    border-radius: 9999px;
}

#ppt-help-popup .ppt-help-topic h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #0f172a);
}

#ppt-help-popup .ppt-help-description {
    font-size: 13px;
    margin-bottom: 12px;
    color: var(--text-secondary, #475569);
}

#ppt-help-popup .ppt-help-body p {
    margin-bottom: 12px;
    line-height: 1.55;
}

#ppt-help-popup .ppt-help-body ul {
    padding-left: 18px;
    margin: 0 0 12px 0;
}

#ppt-help-popup .ppt-help-body li {
    margin-bottom: 6px;
}

#ppt-help-popup .ppt-help-body h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 16px 0 8px 0;
    color: var(--text-primary, #0f172a);
}

#ppt-help-popup .ppt-help-actions {
    margin-top: 16px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

#ppt-help-popup .ppt-help-action {
    flex: 1;
    min-width: 150px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--admin-card-border, rgba(148, 163, 184, 0.35));
    background: rgba(59, 130, 246, 0.08);
    color: var(--color-primary, #2563eb);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

#ppt-help-popup .ppt-help-action:hover {
    background: rgba(59, 130, 246, 0.12);
}

#ppt-help-popup .ppt-help-loading,
#ppt-help-popup .ppt-help-error {
    text-align: center;
    color: var(--text-secondary, #475569);
    font-size: 13px;
    padding: 24px 0;
}

/* Tooltip styling */
.ppt-has-tooltip {
    position: relative;
}

.ppt-tooltip {
    position: fixed;
    z-index: 99999;
    background: rgba(15, 23, 42, 0.95);
    color: #f1f5f9;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    max-width: 240px;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(4px);
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.ppt-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 640px) {
    #ppt-help-widget {
        bottom: 16px;
        right: 16px;
    }

    #ppt-help-popup {
        right: -8px;
        width: min(320px, calc(100vw - 24px));
    }
}
