/* Bulma Framework Overrides and Fixes */
/* These styles override Bulma defaults for our specific needs */

/* Title and subtitle spacing fixes */
.title-row .page-title .title {
    margin-bottom: 1rem !important;
}

.title-row .page-title .subtitle {
    margin-top: 0 !important;
    margin-bottom: 1.5rem !important;
}

/* Make all colored buttons outlined by default */
.button.is-primary,
.button.is-info,
.button.is-warning,
.button.is-danger,
.button.is-light {
    background-color: transparent !important;
    border-width: 1px !important;
    border-style: solid !important;
}

.button.is-primary {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.button.is-info {
    color: var(--info-color) !important;
    border-color: var(--info-color) !important;
}

.button.is-warning {
    color: var(--warning-color) !important;
    border-color: var(--warning-color) !important;
}

.button.is-danger {
    color: var(--danger-color) !important;
    border-color: var(--danger-color) !important;
}

.button.is-light {
    color: var(--text-color) !important;
    border-color: var(--light-button-border) !important;
}

/* Button hover styles - translucent theme color background */
.button.is-primary:hover {
    background-color: rgba(var(--primary-color-rgb), 0.1) !important;
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
}

.button.is-info:hover {
    background-color: rgba(var(--info-color-rgb), 0.1) !important;
    border-color: var(--info-color) !important;
    color: var(--info-color) !important;
}

.button.is-warning:hover {
    background-color: rgba(var(--warning-color-rgb), 0.1) !important;
    border-color: var(--warning-color) !important;
    color: var(--warning-color) !important;
}

.button.is-danger:hover {
    background-color: rgba(var(--danger-color-rgb), 0.1) !important;
    border-color: var(--danger-color) !important;
    color: var(--danger-color) !important;
}

.button.is-light:hover {
    background-color: rgba(var(--light-button-border-rgb), 0.1) !important;
    border-color: var(--light-button-border) !important;
    color: var(--text-color) !important;
}

/* Statistics card spacing fixes */
.stats-card .card-content {
    padding: 1.5rem !important;
}

.stats-card .media {
    align-items: flex-start !important;
}

.stats-card .media-left {
    margin-right: 1.5rem !important;
    margin-top: 0.5rem !important;
}

.stats-card .media-content {
    overflow: visible !important;
}

.stats-card .media-content .title {
    margin-bottom: 0.75rem !important;
    line-height: 1.1 !important;
    font-size: 1.75rem !important;
    font-weight: 600 !important;
}

.stats-card .media-content .subtitle {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    line-height: 1.3 !important;
    font-size: 0.875rem !important;
}
/* Fix title + subtitle cramped spacing - override Bulma negative margin */
.title + .subtitle {
    margin-top: 0.5rem !important;  /* Override Bulma's -1.25rem negative margin */
}

.title.is-spaced + .subtitle {
    margin-top: 0.75rem !important;
}


/* ============================================
   CODE ELEMENT STYLING - Override Bulma's default red code color
   ============================================ */

/* Light mode code styling - uses dark text on light background */
/* Using multiple selectors for maximum specificity */
html:not(.dark-mode) code,
html:not(.dark-mode) .table code,
html:not(.dark-mode) .table.is-fullwidth code,
html:not(.dark-mode) .table.is-striped code,
html:not(.dark-mode) .table.is-hoverable code,
html:not(.dark-mode) .table-container code,
html:not(.dark-mode) .card code,
html:not(.dark-mode) .card-content code,
html:not(.dark-mode) tbody code,
html:not(.dark-mode) tbody td code,
html:not(.dark-mode) tr code,
html:not(.dark-mode) td code {
    background-color: #e8ecf1 !important;
    color: #1a1a2e !important;
    padding: 0.15em 0.4em !important;
    border-radius: 4px !important;
    font-size: 0.9em !important;
}

/* Dark mode code styling - uses light text on dark background */
html.dark-mode code,
html.dark-mode .table code,
html.dark-mode .table.is-fullwidth code,
html.dark-mode .table.is-striped code,
html.dark-mode .table.is-hoverable code,
html.dark-mode .table-container code,
html.dark-mode .card code,
html.dark-mode .card-content code,
html.dark-mode tbody code,
html.dark-mode tbody td code,
html.dark-mode tr code,
html.dark-mode td code {
    background-color: #2d3748 !important;
    color: #e2e8f0 !important;
    padding: 0.15em 0.4em !important;
    border-radius: 4px !important;
    font-size: 0.9em !important;
}
