/* AdTide Custom Styles - Blue Tech Theme */
/* Blues with cyan/teal accents on dark backgrounds */

/* Color Variables Reference:
   Page BG: #1A1F2E (dark-900)
   Panel BG: #151925 (dark-800)
   Card Hover: #1e2336 (dark-700)
   Border: #262b3d (dark-600)
   Primary Gradient: #047492 to #1F576E
   Accent: #94dce2
*/

/* Status badges - dark theme */
.status-testing {
    background-color: rgba(234 179 8 / 0.15);
    color: rgb(250 204 21);
    border-color: rgba(234 179 8 / 0.3);
}

.status-emerging {
    background-color: rgba(59 130 246 / 0.15);
    color: rgb(96 165 250);
    border-color: rgba(59 130 246 / 0.3);
}

.status-scaled {
    background-color: rgba(34 197 94 / 0.15);
    color: rgb(74 222 128);
    border-color: rgba(34 197 94 / 0.3);
}

.status-failed {
    background-color: rgba(239 68 68 / 0.15);
    color: rgb(248 113 113);
    border-color: rgba(239 68 68 / 0.3);
}

/* Tree view - dark theme */
.tree-item {
    position: relative;
}

.tree-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: #262b3d;
}

.tree-item:last-child::before {
    height: 1.5rem;
}

.tree-connector {
    position: absolute;
    left: 0;
    top: 0.75rem;
    width: 1rem;
    height: 1px;
    background-color: #262b3d;
}

/* Quick add input - dark theme */
.quick-add-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px dashed #3a4156;
    border-radius: 0.5rem;
    outline: none;
    transition: all 0.15s ease;
    background-color: #151925;
    color: rgb(226 232 240);
}

.quick-add-input:hover {
    background-color: #1e2336;
    border-color: #4a5568;
}

.quick-add-input:focus {
    border-color: #047492;
    box-shadow: 0 0 0 1px #047492;
    background-color: #151925;
}

.quick-add-input::placeholder {
    color: #5a6478;
    font-style: italic;
}

/* Popover - dark theme */
.popover {
    position: absolute;
    z-index: 50;
    background-color: #151925;
    color: rgb(226 232 240);
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #262b3d;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.4);
    max-width: 200px;
}

.popover::before {
    content: '';
    position: absolute;
    width: 0.5rem;
    height: 0.5rem;
    background-color: #151925;
    border: 1px solid #262b3d;
    transform: rotate(45deg);
}

.popover.popover-top::before {
    bottom: -0.25rem;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    border-top: none;
    border-left: none;
}

.popover.popover-bottom::before {
    top: -0.25rem;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    border-bottom: none;
    border-right: none;
}

/* Modal backdrop - dark theme */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgb(0 0 0 / 0.75);
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.15s ease-out;
}

.modal-content {
    background-color: #1e2336;
    border: 1px solid #262b3d;
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.6);
    max-width: 28rem;
    width: 100%;
    margin: 1rem;
    animation: slideUp 0.2s ease-out;
}

.modal-content h3 {
    color: rgb(241 245 249);
}

.modal-content p {
    color: rgb(148 163 184);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Collapsible sections - dark theme */
.collapse-toggle {
    cursor: pointer;
    user-select: none;
}

.collapse-toggle:hover .collapse-icon {
    color: #94dce2;
}

.collapse-icon {
    transition: transform 0.2s ease;
    color: #5a6478;
}

.collapse-icon.collapsed {
    transform: rotate(-90deg);
}

/* Empty state - dark theme */
.empty-state {
    text-align: center;
    padding: 3rem 0;
    color: #7a8599;
}

/* Loading spinner - dark theme */
.spinner {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #262b3d;
    border-top-color: #047492;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast notifications - dark theme */
.toast {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    background-color: #1e2336;
    border: 1px solid #262b3d;
    color: rgb(226 232 240);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.4);
    z-index: 50;
    animation: slideIn 0.3s ease-out;
}

.toast.toast-success {
    background: linear-gradient(135deg, #047492 0%, #1F576E 100%);
    border-color: #047492;
    color: white;
}

.toast.toast-error {
    background-color: rgb(220 38 38);
    border-color: rgb(248 113 113);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Breadcrumb - dark theme */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #7a8599;
}

.breadcrumb a {
    transition: color 0.15s ease;
    color: #7a8599;
}

.breadcrumb a:hover {
    color: #94dce2;
}

.breadcrumb-separator {
    color: #3a4156;
}

/* Form helpers - dark theme */
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #c4cad6;
    margin-bottom: 0.25rem;
}

.form-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #3a4156;
    border-radius: 0.5rem;
    outline: none;
    transition: all 0.15s ease;
    background-color: #151925;
    color: rgb(241 245 249);
}

.form-input:focus {
    border-color: #047492;
    box-shadow: 0 0 0 2px rgba(4 116 146 / 0.25);
}

.form-input::placeholder {
    color: #5a6478;
}

.form-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #3a4156;
    border-radius: 0.5rem;
    outline: none;
    transition: all 0.15s ease;
    resize: vertical;
    min-height: 100px;
    background-color: #151925;
    color: rgb(241 245 249);
}

.form-textarea:focus {
    border-color: #047492;
    box-shadow: 0 0 0 2px rgba(4 116 146 / 0.25);
}

.form-textarea::placeholder {
    color: #5a6478;
}

.form-select {
    width: 100%;
    padding: 0.5rem 2.5rem 0.5rem 0.75rem;
    border: 1px solid #3a4156;
    border-radius: 0.5rem;
    outline: none;
    transition: all 0.15s ease;
    background-color: #151925;
    color: rgb(241 245 249);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%237a8599'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
}

.form-select:focus {
    border-color: #047492;
    box-shadow: 0 0 0 2px rgba(4 116 146 / 0.25);
}

/* Button variants - dark theme with blue gradient */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.15s ease;
    outline: none;
    border: none;
    cursor: pointer;
}

.btn:focus {
    box-shadow: 0 0 0 2px #1A1F2E, 0 0 0 4px #047492;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #047492 0%, #1F576E 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #058aad 0%, #2a6a82 100%);
}

.btn-secondary {
    background-color: #262b3d;
    color: #c4cad6;
    border: 1px solid #3a4156;
}

.btn-secondary:hover {
    background-color: #3a4156;
    color: white;
}

.btn-danger {
    background-color: rgb(220 38 38);
    color: white;
}

.btn-danger:hover {
    background-color: rgb(239 68 68);
}

.btn-ghost {
    background-color: transparent;
    color: #7a8599;
}

.btn-ghost:hover {
    background-color: #262b3d;
    color: #c4cad6;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Card component - dark theme */
.card {
    background-color: #1e2336;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.3);
    border: 1px solid #262b3d;
}

.card-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #262b3d;
}

.card-body {
    padding: 1rem;
}

/* History panel - dark theme */
.history-panel {
    border-left: 2px solid #262b3d;
    padding-left: 1rem;
}

.history-panel > * + * {
    margin-top: 1rem;
}

.history-item {
    position: relative;
}

.history-item::before {
    content: '';
    position: absolute;
    left: -1.125rem;
    top: 0.5rem;
    width: 0.5rem;
    height: 0.5rem;
    background-color: #3a4156;
    border-radius: 50%;
}

.history-item.current::before {
    background-color: #047492;
}

/* Prose styles for script content - dark theme */
.prose {
    line-height: 1.7;
    color: #c4cad6;
}

.prose p {
    margin-bottom: 1rem;
}

/* Details/summary styling - dark theme */
details summary {
    list-style: none;
}

details summary::-webkit-details-marker {
    display: none;
}

details[open] summary {
    border-bottom: 1px solid #262b3d;
}

/* Page text colors - dark theme */
h1, h2, h3 {
    color: rgb(241 245 249);
}

/* Alert boxes - dark theme */
.bg-red-50 {
    background-color: rgba(239 68 68 / 0.1) !important;
}

.bg-green-50 {
    background-color: rgba(4 116 146 / 0.15) !important;
}

.bg-yellow-50 {
    background-color: rgba(234 179 8 / 0.1) !important;
}

.border-red-200 {
    border-color: rgba(239 68 68 / 0.3) !important;
}

.border-green-200 {
    border-color: rgba(4 116 146 / 0.4) !important;
}

.border-yellow-200 {
    border-color: rgba(234 179 8 / 0.3) !important;
}

.text-red-700 {
    color: rgb(248 113 113) !important;
}

.text-green-700 {
    color: #94dce2 !important;
}

.text-yellow-700 {
    color: rgb(250 204 21) !important;
}

/* Link colors */
a.text-gray-900, a.font-medium.text-gray-900 {
    color: rgb(241 245 249);
}

a.text-gray-900:hover, a.font-medium.text-gray-900:hover {
    color: #94dce2;
}

/* Status indicator colors */
.text-yellow-500 {
    color: rgb(250 204 21) !important;
}

.text-blue-500 {
    color: rgb(59 130 246) !important;
}

.text-green-500 {
    color: rgb(34 197 94) !important;
}

.text-red-500 {
    color: rgb(248 113 113) !important;
}

/* Text colors - dark theme overrides */
.text-gray-900 {
    color: rgb(241 245 249);
}

.text-gray-800 {
    color: rgb(226 232 240);
}

.text-gray-700 {
    color: #c4cad6;
}

.text-gray-600 {
    color: #9aa3b5;
}

.text-gray-500 {
    color: #7a8599;
}

.text-gray-400 {
    color: #5a6478;
}

/* Info box styling - dark theme */
.bg-blue-100 {
    background-color: rgba(4 116 146 / 0.2) !important;
}

.text-blue-700 {
    color: #94dce2 !important;
}

/* Kbd styling for help text */
kbd {
    background-color: #262b3d;
    color: #7a8599;
    border: 1px solid #3a4156;
}

/* Gradient text for special elements */
.gradient-text {
    background: linear-gradient(135deg, #047492 0%, #94dce2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glow effect for focus states */
.glow-blue:focus {
    box-shadow: 0 0 15px rgba(4 116 146 / 0.4);
}

/* Chat sidebar colors */
.bg-dark-900 {
    background-color: #0f1218;
}

.bg-dark-800 {
    background-color: #151925;
}

.bg-dark-700 {
    background-color: #1e2336;
}

.border-dark-600 {
    border-color: #262b3d;
}

.bg-primary-600 {
    background: linear-gradient(135deg, #047492 0%, #1F576E 100%);
}

.text-primary-200 {
    color: rgba(148 220 226 / 0.7);
}

.text-primary-400 {
    color: #94dce2;
}
