/**
 * Paralelo Custom Styles
 * Centralized styles for buttons, utilities, forms, cards, and brand consistency.
 */

:root {
    --tblr-primary: #1a5772;
    --tblr-primary-rgb: 26, 87, 114;
    --tblr-primary-fg: #ffffff;
    --tblr-primary-darken: #144358;
    --tblr-primary-lt: #e8f3f7;
    --tblr-primary-lt-rgb: 232, 243, 247;
    --tblr-link-color: #1a5772;
    --tblr-link-hover-color: #144358;
    --bs-primary: #1a5772;
    --bs-primary-rgb: 26, 87, 114;
    --bs-link-color: #1a5772;
    --bs-link-hover-color: #144358;
}

/* Alpine.js utility */
[x-cloak] {
    display: none !important;
}

/* General utilities */
.cursor-pointer {
    cursor: pointer;
}

.border-primary {
    border-color: #1a5772 !important;
}

/* Primary buttons */
.btn-primary {
    background-color: #1a5772;
    border-color: #1a5772;
    color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.btn-primary:active:focus {
    background-color: #144358;
    border-color: #144358;
    color: #ffffff;
}

/* Outline primary buttons */
.btn-outline-primary,
.btn-outline-inst {
    color: #1a5772;
    border-color: #1a5772;
    background-color: transparent;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-outline-primary.active,
.btn-outline-inst:hover,
.btn-outline-inst:focus,
.btn-outline-inst:active,
.btn-outline-inst.active {
    background-color: #1a5772;
    border-color: #1a5772;
    color: #ffffff;
}

/* Danger buttons */
.btn-ghost-danger:hover {
    background-color: rgba(214, 57, 57, 0.1);
    color: #d63939;
}

/* Card actions & icons */
.card-actions .btn-action {
    width: 2.25rem !important;
    height: 2.25rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.card-actions .btn-action i {
    font-size: 1.25rem !important;
    color: #1a5772 !important;
}

.input-icon-addon i {
    color: #1a5772 !important;
}

/* Form controls */
.form-check-input:checked {
    background-color: #1a5772;
    border-color: #1a5772;
}

.form-control:focus,
.form-select:focus {
    border-color: #1a5772;
    box-shadow: 0 0 0 0.25rem rgba(26, 87, 114, 0.25);
}

/* Interactive list items */
.list-group-header {
    font-size: 0.75rem;
    letter-spacing: 0.04em;
}

.project-item {
    border: none !important;
    border-left: 3px solid transparent !important;
    color: #334155;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
}

.project-item:hover {
    background-color: #f1f5f9;
    color: #1a5772;
}

.project-item.active {
    background-color: rgba(26, 87, 114, 0.08) !important;
    color: #1a5772 !important;
    font-weight: 600;
    border-left: 3px solid #1a5772 !important;
}

.list-item-custom {
    transition: background-color 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
    border-left: 3px solid transparent;
}

.list-item-custom:hover {
    background-color: rgba(26, 87, 114, 0.04);
    border-left-color: #1a5772;
    transform: translateX(2px);
}

.list-item-new {
    border-top: 1px dashed #cbd5e1 !important;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.list-item-new:hover {
    background-color: #f8fafc;
}

/* Folder / Interactive cards */
.folder-card {
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.folder-card:hover {
    border-color: rgba(26, 87, 114, 0.4);
}

.folder-card.border-primary,
.folder-card.border-primary:hover {
    border-color: #1a5772 !important;
}

/* Drag handles & Sortable utilities */
.drag-handle {
    cursor: grab;
    opacity: 0.4;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.folder-card:hover .drag-handle,
.list-group-item:hover .drag-handle,
.card:hover .drag-handle {
    opacity: 0.9;
}

.drag-handle:active {
    cursor: grabbing;
}

.sortable-ghost {
    opacity: 0.35 !important;
}

.sortable-chosen {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Dashboard layout & custom scrollbars */
.dashboard-card {
    height: calc(100vh - 160px);
    min-height: 540px;
    display: flex;
    flex-direction: column;
}

.dashboard-card .card-header {
    flex-shrink: 0;
}

/* Unified Custom Scrollbar Utility */
.custom-scroll,
.dashboard-card-body-scroll,
.sidebar-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
}

.custom-scroll,
.dashboard-card-body-scroll,
.sidebar-scroll,
.table-responsive {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f8fafc;
}

.custom-scroll::-webkit-scrollbar,
.dashboard-card-body-scroll::-webkit-scrollbar,
.sidebar-scroll::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scroll::-webkit-scrollbar-track,
.dashboard-card-body-scroll::-webkit-scrollbar-track,
.sidebar-scroll::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track {
    background: #f8fafc;
}

.custom-scroll::-webkit-scrollbar-thumb,
.dashboard-card-body-scroll::-webkit-scrollbar-thumb,
.sidebar-scroll::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 10px;
}

/* Card Collapsible & Animations */
.card-collapsed-custom .card-body {
    display: none;
}

.card-collapsed-custom .ti-chevron-down {
    transform: rotate(-90deg);
}

.ti-chevron-down {
    transition: transform 0.3s ease;
}
