/* Estilos personalizados para Orchid Platform */

/* Variables CSS */
:root {
    --primary: #0ea5e9; /* Sky 500 */
    --text-main: #334155;
    --text-light: #94a3b8;
}

/* Evitar huecos verticales cuando Orchid renderiza el formulario principal con h-100 */
form#post-form.h-100 {
    height: auto !important;
    min-height: 0 !important;
}

/* Personalización de la sidebar de Orchid - Múltiples selectores para asegurar compatibilidad */
.aside,
aside.aside,
[class*="aside"],
.bg-dark.aside,
nav.aside,
.bg-dark,
aside.bg-dark,
[data-bs-theme="dark"] aside,
body aside.bg-dark {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%) !important;
    background-image: linear-gradient(180deg, #0f172a 0%, #1e293b 100%) !important;
}

/* Selector más específico para la sidebar de Orchid */
body aside,
body .aside,
body nav.aside {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%) !important;
    background-image: linear-gradient(180deg, #0f172a 0%, #1e293b 100%) !important;
}

/* Asegurar que el gradiente se aplique también a elementos hijos importantes */
.aside .navbar,
.aside .menu,
.aside nav,
.bg-dark .navbar,
.bg-dark .menu {
    background: transparent !important;
    background-image: none !important;
}

/* Color de fuente para los links de la sidebar */
.aside a,
.aside .nav-link,
.aside .navbar-nav a,
.aside .menu-item,
.aside .dropdown-item,
.aside li > a,
.bg-dark a,
.bg-dark .nav-link,
.bg-dark .navbar-nav a,
aside.bg-dark a,
aside.bg-dark .nav-link,
body aside a,
body aside .nav-link,
body .aside a,
body .aside .nav-link {
    color: #94a3b8 !important;
}

/* Color para los links hover (opcional, mantener visible) */
.aside a:hover,
.aside .nav-link:hover,
.aside .navbar-nav a:hover,
.aside .menu-item:hover,
.bg-dark a:hover,
.bg-dark .nav-link:hover,
aside.bg-dark a:hover,
body aside a:hover,
body .aside a:hover {
    color: #ffffff !important;
}

/* Estilos para el item activo de la sidebar */
.aside a.active,
.aside .nav-link.active,
.aside .nav-link[aria-current="page"],
.aside .navbar-nav a.active,
.aside .menu-item.active,
.aside li.active > a,
.aside .navbar-nav > li.active > a,
.bg-dark a.active,
.bg-dark .nav-link.active,
.bg-dark .navbar-nav a.active,
aside.bg-dark a.active,
aside.bg-dark .nav-link.active,
body aside a.active,
body aside .nav-link.active,
body .aside a.active,
body .aside .nav-link.active {
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.15) 0%, rgba(14, 165, 233, 0) 100%) !important;
    color: var(--primary) !important;
    border-left: 3px solid var(--primary) !important;
    border-radius: 0 12px 12px 0 !important;
}

/* Color de fondo para el contenedor principal del contenido */
.col-xxl.col-xl-9.col-12.mx-auto,
div.col-xxl.col-xl-9.col-12.mx-auto {
    background-color: #f1f5f9 !important;
}

/* Estilos para el título h1 */
h1.m-0.fw-light.h3.text-body-emphasis,
h1.m-0.fw-light.h3,
h1.text-body-emphasis {
    font-size: 32px !important;
    font-weight: 800 !important;
    color: #1e293b !important;
    letter-spacing: -1px !important;
}

/* Estilos para párrafos con clase text-sm */
p.text-sm {
    padding-top: 0px !important;
    padding-bottom: 0px !important;
    margin-top: 16px !important;
}

/* Eliminar fondo blanco y sombra del componente de título (layout) en command-bar-wrapper */
.command-bar-wrapper .layout,
.command-bar-wrapper .layout.d-md-flex,
.command-bar-wrapper .layout.d-md-flex.align-items-center,
div.command-bar-wrapper > div.layout,
div.command-bar-wrapper > div.layout.d-md-flex,
div.command-bar-wrapper > div.layout.d-md-flex.align-items-center,
.command-bar-wrapper > .layout,
.command-bar-wrapper > .layout.d-md-flex,
.command-bar-wrapper > .layout.d-md-flex.align-items-center {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
}

/* Eliminar fondo blanco y sombra del command-bar-wrapper cuando contiene layout de título */
.command-bar-wrapper:has(.layout),
.command-bar-wrapper:has(.layout.d-md-flex),
.command-bar-wrapper:has(.layout.d-md-flex.align-items-center) {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
}

/* Estilos para el botón "Agregar" del commandBar - Similar a btn-add de index-v3.html */
/* Selector principal por ID */
a[id^="field-agregar-"],
a.btn.btn-link.icon-link[id^="field-agregar-"],
.command-bar-wrapper a.btn-link[id^="field-agregar-"],
.command-bar-wrapper a[href*="create"][id^="field-agregar-"] {
    background: #334155 !important; /* var(--text-main) */
    color: white !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 30px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
    transition: transform 0.2s, background 0.2s !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* Hover para botones por ID */
a[id^="field-agregar-"]:hover,
a.btn.btn-link.icon-link[id^="field-agregar-"]:hover,
.command-bar-wrapper a.btn-link[id^="field-agregar-"]:hover,
.command-bar-wrapper a[href*="create"][id^="field-agregar-"]:hover {
    transform: scale(1.05) !important;
    background: #0f172a !important;
    color: white !important;
    text-decoration: none !important;
}

/* Selectores adicionales para botones "Agregar" en commandBar que apuntan a rutas create */
.command-bar-wrapper a.btn-link[href*="/create"],
.command-bar-wrapper ul.nav.command-bar a.btn-link[href*="create"],
.command-bar-wrapper .nav.command-bar a.btn-link[href*="create"] {
    background: #334155 !important;
    color: white !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 30px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
    transition: transform 0.2s, background 0.2s !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.command-bar-wrapper a.btn-link[href*="/create"]:hover,
.command-bar-wrapper ul.nav.command-bar a.btn-link[href*="create"]:hover,
.command-bar-wrapper .nav.command-bar a.btn-link[href*="create"]:hover {
    transform: scale(1.05) !important;
    background: #0f172a !important;
    color: white !important;
    text-decoration: none !important;
}

/* Estilos para breadcrumbs - Copiados de index-v3.html */
ol.breadcrumb,
.breadcrumb {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 13px !important;
    background: white !important;
    padding: 8px 16px !important;
    border-radius: 20px !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02) !important;
    margin-bottom: 0 !important;
    list-style: none !important;
    width: fit-content !important;
}

ol.breadcrumb li,
.breadcrumb li,
.breadcrumb-item {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

ol.breadcrumb a,
.breadcrumb a {
    color: var(--text-light) !important;
    text-decoration: none !important;
    font-weight: 500 !important;
}

ol.breadcrumb li.active,
.breadcrumb li.active,
.breadcrumb-item.active {
    color: var(--text-main) !important;
    font-weight: 600 !important;
}

/* Separadores de breadcrumb */
ol.breadcrumb li + li::before,
.breadcrumb-item + .breadcrumb-item::before {
    content: "/" !important;
    color: #cbd5e1 !important;
    padding: 0 4px !important;
}

/* Estilos para elemento nav principal */
nav {
    margin-bottom: 25px !important;
    box-sizing: content-box !important;
}

/* Estilos para subtítulos separadores de sección en el sidebar */
#headerMenuCollapse li.nav-item.mt-3.mb-1 > small.text-muted,
#headerMenuCollapse li.nav-item > small.text-muted.ms-4.user-select-none,
#headerMenuCollapse .nav-item small.text-muted.user-select-none,
#headerMenuCollapse small.text-muted.ms-4.w-100.user-select-none,
nav#headerMenuCollapse small.text-muted,
.aside li.nav-item.mt-3.mb-1 > small.text-muted,
.bg-dark li.nav-item.mt-3.mb-1 > small.text-muted,
aside li.nav-item.mt-3.mb-1 > small.text-muted {
    font-size: 10px !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    font-weight: 800 !important;
    letter-spacing: 1.5px !important;
}

.gce-cycle-context__panel {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: end;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 18px 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.gce-cycle-context__copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gce-cycle-context__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #64748b;
    font-weight: 800;
}

.gce-cycle-context__title {
    font-size: 20px;
    color: #0f172a;
}

.gce-cycle-context__subtitle {
    color: #475569;
    font-size: 14px;
}

.gce-cycle-context__form {
    min-width: 280px;
}

.gce-cycle-context__form .form-select {
    min-width: 260px;
    border-radius: 12px;
    border-color: #cbd5e1;
}

.gce-cycle-select {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.gce-cycle-select__intro {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f0;
    border-radius: 22px;
    padding: 28px;
}

.gce-cycle-select__intro h2 {
    color: #ffffff;
    margin: 8px 0 10px;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.gce-cycle-select__intro p {
    margin: 0;
    max-width: 680px;
    color: #cbd5e1;
}

.gce-cycle-select__eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #7dd3fc;
}

.gce-cycle-select__card {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 8px;
    padding: 24px;
    border-radius: 20px;
    border: 1px solid #dbeafe;
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 14px 30px rgba(14, 165, 233, 0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.gce-cycle-select__card:hover {
    transform: translateY(-2px);
    border-color: #38bdf8;
    box-shadow: 0 20px 40px rgba(14, 165, 233, 0.14);
}

.gce-cycle-select__card.is-current {
    border-color: #0ea5e9;
    background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%);
}

.gce-cycle-select__year {
    font-size: 34px;
    font-weight: 900;
    line-height: 1;
}

.gce-cycle-select__name {
    font-size: 18px;
    font-weight: 700;
}

.gce-cycle-select__meta {
    color: #475569;
    font-size: 14px;
}

@media (max-width: 768px) {
    .gce-cycle-context__panel {
        align-items: start;
        flex-direction: column;
    }

    .gce-cycle-context__form,
    .gce-cycle-context__form .form-select {
        width: 100%;
        min-width: 0;
    }
}
