/**
 * Global Framework Styles
 * Dark mode button contrast fixes and common overrides
 */

/* ============================================
   Dark Mode Button Contrast Fixes
   ============================================ */

/* In dark mode, outline buttons need better visibility */
[data-bs-theme="dark"] .btn-outline-secondary {
    color: #adb5bd;
    border-color: #6c757d;
}

[data-bs-theme="dark"] .btn-outline-secondary:hover {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

[data-bs-theme="dark"] .btn-outline-primary {
    color: #6ea8fe;
    border-color: #6ea8fe;
}

[data-bs-theme="dark"] .btn-outline-primary:hover {
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
}

[data-bs-theme="dark"] .btn-outline-danger {
    color: #ea868f;
    border-color: #ea868f;
}

[data-bs-theme="dark"] .btn-outline-danger:hover {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
}

[data-bs-theme="dark"] .btn-outline-warning {
    color: #ffda6a;
    border-color: #ffda6a;
}

[data-bs-theme="dark"] .btn-outline-warning:hover {
    color: #000;
    background-color: #ffc107;
    border-color: #ffc107;
}

[data-bs-theme="dark"] .btn-outline-success {
    color: #75b798;
    border-color: #75b798;
}

[data-bs-theme="dark"] .btn-outline-success:hover {
    color: #fff;
    background-color: #198754;
    border-color: #198754;
}

[data-bs-theme="dark"] .btn-outline-info {
    color: #6edff6;
    border-color: #6edff6;
}

[data-bs-theme="dark"] .btn-outline-info:hover {
    color: #000;
    background-color: #0dcaf0;
    border-color: #0dcaf0;
}

/* Dark mode table header fix */
[data-bs-theme="dark"] .table-light {
    --bs-table-bg: #2b3035;
    --bs-table-border-color: #495057;
    color: #dee2e6;
}

/* ============================================
   Theme Toggle Button
   ============================================ */

.theme-toggle {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: inherit;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

[data-bs-theme="light"] .theme-toggle {
    border-color: rgba(0, 0, 0, 0.2);
}

[data-bs-theme="light"] .theme-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.4);
}

/* Hide the icon that doesn't match current theme */
[data-bs-theme="dark"] .theme-toggle .bi-moon-fill {
    display: none;
}

[data-bs-theme="light"] .theme-toggle .bi-sun-fill {
    display: none;
}

/* ============================================
   Action Button Groups - Better Spacing
   ============================================ */

.btn-group .btn + .btn,
.btn-group .btn + form,
.btn-group form + .btn,
.btn-group form + form {
    margin-left: -1px;
}

.btn-group form {
    display: inline-block;
}

.btn-group form .btn {
    border-radius: 0;
}

.btn-group > .btn:first-child,
.btn-group > form:first-child .btn {
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
}

.btn-group > .btn:last-child,
.btn-group > form:last-child .btn {
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
}

/* ============================================
   Heading Classes - Better Styling
   ============================================ */

.h1 {
    /* 40px Font Size */
    font-size: 2.5rem;

    font-weight: 500;
    line-height: 1.2;
}

.h2 {
    /* 32px Font Size */
    font-size: 2rem;

    font-weight: 500;
    line-height: 1.3;
}

.h3 {
    /* 28px Font Size */
    font-size: 1.75rem;

    font-weight: 500;
    line-height: 1.4;
}

.h4 {
    /* 24px Font Size */
    font-size: 1.5rem;

    font-weight: 500;
    line-height: 1.5;
}

.h5 {
    /* 20px Font Size */
    font-size: 1.25rem;

    font-weight: 500;
    line-height: 1.6;
}

.h6 {
    /* 18px Font Size */
    font-size: 1.125rem;

    font-weight: 500;
    line-height: 1.6;
}

/* ============================================
   Font Size Classes - Better Styling
   ============================================ */

.fs-1 {
    /* 40px Font Size */
    font-size: 2.5rem;
}

.fs-2 {
    /* 32px Font Size */
    font-size: 2rem;
}

.fs-3 {
    /* 28px Font Size */
    font-size: 1.75rem;
}

.fs-4 {
    /* 24px Font Size */
    font-size: 1.5rem;
}

.fs-5 {
    /* 20px Font Size */
    font-size: 1.25rem;
}

.fs-6 {
    /* 18px Font Size */
    font-size: 1.125rem;
}
