/* =============================================
   Custom Home Page Styles
   Supplements missing CSS from extracted Next.js styles
   ============================================= */

/* coco-skeleton fallback (in case any remain) */
.coco-skeleton {
    display: inline-block;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.coco-skeleton-element {
    display: inline-block;
    vertical-align: top;
}

.coco-skeleton-button {
    display: block;
    border-radius: 6px;
}

.coco-skeleton-image {
    border-radius: 6px;
}

.coco-skeleton-active .coco-skeleton-button,
.coco-skeleton-active .coco-skeleton-image {
    background: linear-gradient(90deg, rgba(255,255,255,0.06) 25%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.06) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Make coco-select look like a proper dropdown */
.coco-select {
    cursor: pointer;
}

.coco-select .coco-select-selector {
    cursor: pointer;
    transition: background 0.2s;
}

.coco-select:hover .coco-select-selector {
    background: rgba(255, 255, 255, 0.04) !important;
}

/* Prevent hidden search input from interfering with clicks */
.coco-select-selection-search-input {
    pointer-events: none !important;
}

/* Ensure glass-surface form container has proper appearance */
[data-slot="glass-surface"] {
    min-height: 180px;
}

/* ProseMirror editor fallback (since ProseMirror JS isn't loaded) */
[data-slot="editor-content"] {
    min-height: 60px;
    cursor: text;
}

[data-slot="editor-content"]:focus-within {
    outline: none;
}

[data-slot="editor-content"][contenteditable="true"] {
    color: #fff;
    font-size: 14px;
    line-height: 20px;
    outline: none;
}

/* Make the editor content area editable-looking */
[data-button-name="prompt_input"] {
    cursor: text;
}

/* Style the upload card hover effect */
.group\/upload-card:hover .border-f-border-active {
    border-color: rgba(255, 52, 102, 0.5) !important;
}

/* Ensure forms have consistent height */
[data-tab] form {
    min-height: 180px;
}

/* Mobile bottom nav spacing fix */
body {
    padding-bottom: env(safe-area-inset-bottom, 0);
}

@media (max-width: 767px) {
    body {
        padding-bottom: 60px;
    }
}

/* Dropdown menu styles for model/func selectors */
.home-model-dropdown-body,
#func-dropdown {
    animation: dropdown-fade-in 0.15s ease-out;
}

@keyframes dropdown-fade-in {
    from {
        opacity: 0;
        transform: translateY(4px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Style the editor placeholder when ProseMirror is not loaded */
[data-slot="editor-placeholder"] {
    pointer-events: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
    line-height: 20px;
}

/* Make text inputs in forms visible */
.coco-input {
    color: #fff;
}

/* Ensure the chat box container has proper z-index */
[data-widget-name="chat_box"] {
    position: relative;
}

/* Style the submit button when enabled */
[data-button-name="submit"]:not([disabled]) {
    background: #fff !important;
    color: #1e1c27 !important;
    cursor: pointer !important;
}

[data-button-name="submit"]:not([disabled]):hover {
    background: rgba(255, 255, 255, 0.8) !important;
}

[data-button-name="submit"][disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}
