/* Main application styles for navbar_sidebar layout */

:root {
    --brand-color: #0f0859;
    --brand-hover: #1a0f7a;
}

* {
    box-sizing: border-box;
}

/* Page Header */
.page-header {
    background: white;
    border-bottom: 1px solid #e0e0e0;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

/* Content Cards */
.content-card {
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    padding: 2rem;
    margin: 0 2rem 2rem 2rem;
}

/* Form Elements */
.form-label {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border-radius: 6px;
    border: 1px solid #dee2e6;
    padding: 0.625rem 0.75rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 0.2rem rgba(15, 8, 89, 0.1);
}

/* Buttons */
.btn-primary {
    background-color: var(--brand-color);
    border-color: var(--brand-color);
    font-weight: 500;
}

.btn-primary:hover {
    background-color: var(--brand-hover);
    border-color: var(--brand-hover);
}

.btn-secondary {
    border-radius: 6px;
    padding: 0.625rem 1.25rem;
}

/* Select2 Customization */
.select2-container {
    width: 100% !important;
}

.select2-container--default .select2-selection--multiple {
    border-radius: 6px;
    border: 1px solid #dee2e6;
    min-height: 38px;
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 0.2rem rgba(15, 8, 89, 0.1);
}


/* Table */

.table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}
.table th,
.table td {
    padding: 10px 12px;
    text-align: left;
    vertical-align: middle;
    font-size: 0.9rem;
    border: 1px solid #ddd;
}
.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
}
.table tbody {
    border-top: none !important;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Help Tooltip */

.help-icon-wrapper,
.timeline-help-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.help-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px); /* opens upward by default */
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px 14px;
    width: 240px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    font-size: 0.8rem;
    color: #333;
    z-index: 200;
    pointer-events: none;
    line-height: 1.5;
}

.help-tooltip strong {
    display: block;
    margin-bottom: 6px;
    color: #111;
}

.help-tooltip ul {
    margin: 0;
    padding-left: 16px;
}

.help-tooltip li {
    margin-bottom: 3px;
}

/* Opens leftward for the timeline icon (near screen edge) */
.help-tooltip--left {
    left: auto;
    right: 0;
    transform: none;
}

.help-tooltip--down {
    bottom: auto;
    top: calc(100% + 6px);
}

.help-icon-wrapper:hover .help-tooltip,
.timeline-help-wrapper:hover .help-tooltip {
    display: block;
}