@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

html {
    font-size: 14px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

html {
    position: relative;
    min-height: 100%;
}

body {
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
    margin-bottom: 60px;
    color: #2c3e50;
    line-height: 1.6;
}

a {
    color: #B22222;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #DC143C;
    text-decoration: none;
}

/*
    background-color
*/

.bg-firebrick {
    background-color: #B22222;
    box-shadow: 0 2px 8px rgba(178, 34, 34, 0.2);
}

/*
    Buttons
*/

/* Enhanced Button Design */
.btn {
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.025em;
    text-transform: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-firebrick {
    color: #fff;
    background: linear-gradient(135deg, #DC143C, #B22222);
    border: none;
    padding: 12px 24px;
    box-shadow: 0 4px 12px rgba(178, 34, 34, 0.25);
    position: relative;
}

.btn-firebrick::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.btn-firebrick:hover {
    color: #fff;
    background: linear-gradient(135deg, #FF1493, #DC143C);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(220, 20, 60, 0.35);
}

.btn-firebrick:hover::before {
    left: 100%;
}

.btn-firebrick:focus {
    color: #fff;
    background: linear-gradient(135deg, #FF1493, #DC143C);
    box-shadow: 0 0 0 4px rgba(178, 34, 34, 0.2);
    outline: none;
}

.btn-firebrick:active {
    color: #fff;
    background: linear-gradient(135deg, #8B0000, #B22222);
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(178, 34, 34, 0.3);
}

.btn-firebrick:disabled {
    color: rgba(255, 255, 255, 0.7);
    background: linear-gradient(135deg, #999, #777);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Secondary Button Styles */
.btn-outline-secondary {
    color: #6c757d;
    border: 2px solid #6c757d;
    background: transparent;
    font-weight: 600;
    padding: 10px 20px;
}

.btn-outline-secondary:hover {
    color: white;
    background-color: #6c757d;
    border-color: #6c757d;
    transform: translateY(-1px);
}

/* Button Sizes */
.btn-lg {
    padding: 14px 32px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}


/*
    Navbar
*/

.navbar-firebrick .navbar-brand {
    color: white;
    font-weight: 600;
    font-size: 1.4rem;
    transition: color 0.2s ease;
}

.navbar-firebrick .navbar-brand:hover, .navbar-firebrick .navbar-brand:focus {
    color: rgba(255, 255, 255, 0.9);
}

.navbar-firebrick .navbar-nav .nav-link {
    color: white;
    font-weight: 500;
    transition: color 0.2s ease;
    padding: 8px 16px;
    margin: 0 4px;
}

.navbar-firebrick .navbar-nav .nav-link:hover, .navbar-firebrick .navbar-nav .nav-link:focus {
    color: rgba(255, 255, 255, 0.9);
}

.navbar-firebrick .navbar-nav .nav-link.disabled {
    color: rgba(255, 255, 255, 0.5);
}

.navbar-firebrick .navbar-nav .show > .nav-link,
.navbar-firebrick .navbar-nav .nav-link.active {
    color: rgba(255, 255, 255, 0.9);
}

.navbar-firebrick .navbar-toggler {
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: border-color 0.2s ease;
}

.navbar-firebrick .navbar-toggler:hover {
    border-color: rgba(255, 255, 255, 0.7);
}

.navbar-firebrick .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-firebrick .navbar-text {
    color: white;
}

.navbar-firebrick .navbar-text a,
.navbar-firebrick .navbar-text a:hover,
.navbar-firebrick .navbar-text a:focus {
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.2s ease;
}

.btn_festive_primary {
    color: #fff;
    background-color: #6AB222;
    border-color: #5fa01f;
}

.icon_button {
    width: 1.75em;
    height: 1.75em;
    padding: 0.15em;
}

.exception-section {
    margin-top: 20px;
    border: 1px solid #ccc;
    padding: 20px;
    border-radius: 5px;
}

.exception-form {
    display: flex;
    flex-direction: column;
}

.exception-form select {
    margin-bottom: 10px;
}

.exception-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.exception-manage-button {
    flex-grow: 1;
    margin-right: 10px;
}

/* Style the dropdown container */
.dropdown-container {
    position: relative;
    display: inline-block;
}

.dropdown-arrow::after {
    content: "\25BC"; /* Unicode arrow-down character */
    position: absolute;
    top: 50%;
    right: 10px; /* Adjust as needed */
    transform: translateY(-50%);
}

#participatingDropdown {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
}

/* Style the dropdown options */
#participatingDropdown option {
    font-size: 14px;
}

.hoverable {
    cursor: pointer;
}

/* Modern Card Styling */
.modern-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

/* Enhanced Form Design */
.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 16px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fafafa;
    font-weight: 500;
}

.form-control:focus {
    border-color: #B22222;
    box-shadow: 0 0 0 3px rgba(178, 34, 34, 0.1);
    outline: none;
    background-color: white;
    transform: translateY(-1px);
}

.form-control:hover:not(:focus) {
    border-color: #ced4da;
    background-color: white;
}

.form-label, .control-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    display: block;
    letter-spacing: 0.025em;
}

/* Form Sections */
.form-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-left: 4px solid #B22222;
}

.form-section h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #B22222;
}

/* Input Groups */
.input-group {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.input-group .form-control {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}

.input-group .form-control:only-child {
    border-radius: 10px;
    border-right: 2px solid #e9ecef;
}

.input-group-append .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    border-left: none;
}

/* Standalone textarea styling fix */
textarea.form-control:not(.input-group .form-control) {
    border-radius: 10px;
}

/* Textarea */
textarea.form-control {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

/* Enhanced Table Design */
.table {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    border: none;
    margin-bottom: 2rem;
}

.table th {
    background: linear-gradient(135deg, #DC143C, #B22222);
    color: white;
    font-weight: 600;
    border: none;
    padding: 20px 18px;
    text-align: left;
    font-size: 0.95rem;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    position: relative;
}

.table th:last-child {
    text-align: center;
}

.table th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
}

.table td {
    border: none;
    padding: 18px;
    vertical-align: middle;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-weight: 500;
    color: #2c3e50;
}

.table td:last-child {
    text-align: center;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background: linear-gradient(135deg, rgba(178, 34, 34, 0.03), rgba(220, 20, 60, 0.02));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* List Group Improvements */
.list-group {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.list-group-item {
    border: none;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: white;
    transition: all 0.2s ease;
}

.list-group-item:hover {
    background: linear-gradient(135deg, rgba(178, 34, 34, 0.03), rgba(220, 20, 60, 0.02));
    transform: translateY(-1px);
}

.list-group-item:last-child {
    border-bottom: none;
}

/* Alert Styling */
.alert {
    border-radius: 16px;
    border: none;
    padding: 1.5rem;
    font-weight: 500;
}

.alert-warning {
    background: linear-gradient(135deg, #FFA500, #FFD700);
    color: #8B4513;
    box-shadow: 0 4px 20px rgba(255, 165, 0, 0.2);
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h1 {
    font-size: 2.5rem;
    color: #B22222;
    margin-bottom: 1.5rem;
    margin-top: 0;
}

h2 {
    font-size: 1.75rem;
    color: #B22222;
    margin-bottom: 1.25rem;
    margin-top: 2rem;
}

h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

h4, h5, h6 {
    font-size: 1.25rem;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    margin-top: 1rem;
}

p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Content Sections */
.content-section {
    margin-bottom: 2.5rem;
}

.content-section:last-child {
    margin-bottom: 0;
}

/* Container improvements */
main .container {
    position: relative;
    z-index: 1;
}

/* Exception section styling */
.exception-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
    border: 1px solid #dee2e6;
}

.exception-buttons {
    margin-top: 1.5rem;
    gap: 1rem;
}

/* Select dropdown styling */
select.form-control {
    background: rgba(255, 255, 255, 0.9);
    background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%23666' d='M2 0L0 2h4zM2 5L0 3h4z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 40px;
}

/* Enhanced HR */
hr {
    border: none;
    height: 3px;
    background: linear-gradient(90deg, transparent, #DC143C 20%, #B22222 50%, #DC143C 80%, transparent);
    margin: 2.5rem 0;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

hr::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Subtle Animations */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Enhanced Focus States */
*:focus {
    outline: none;
}

button:focus,
.btn:focus,
input:focus,
select:focus,
textarea:focus {
    transform: translateY(-1px);
    transition: transform 0.2s ease;
}

/* Improved Shadows */
.shadow-soft {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.shadow-medium {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.shadow-strong {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Christmas Decorative Elements */
.festive-accent::before {
    content: '🎄';
    margin-right: 0.5rem;
    opacity: 0.8;
}


/* Micro Interactions */
.interactive-scale {
    transition: transform 0.2s ease;
}

.interactive-scale:hover {
    transform: scale(1.02);
}

.interactive-glow:hover {
    box-shadow: 0 0 20px rgba(178, 34, 34, 0.3);
    transition: box-shadow 0.3s ease;
}

/* Icon buttons */
.icon_button {
    border-radius: 50%;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    border: none;
}

.icon_button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    max-width: 400px;
    min-width: 320px;
}

.wichtel-toast {
    background: white;
    border-radius: 12px;
    padding: 18px 22px;
    margin-bottom: 12px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.4;
    opacity: 1;
    transform: translateX(0) scale(1);
    animation: toastSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.wichtel-toast.success {
    background: linear-gradient(135deg, #d4edda, #f1f9f3);
    color: #155724;
    border-left: 5px solid #28a745;
}

.wichtel-toast.success::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #28a745, transparent);
}

.wichtel-toast.error {
    background: linear-gradient(135deg, #ffe5e7, #fff8f8);
    color: #8B0000;
    border-left: 5px solid #B22222;
}

.wichtel-toast.error::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #DC143C, transparent);
}

.wichtel-toast.removing {
    animation: toastSlideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(100%) scale(0.95);
    }
}

.toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 600;
}

.toast-close {
    background: rgba(0, 0, 0, 0.1);
    border: none;
    color: currentColor;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    min-width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 700;
    margin-left: 12px;
    opacity: 0.7;
    flex-shrink: 0;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.2);
    opacity: 1;
    transform: scale(1.1);
}

.wichtel-toast.success .toast-close:hover {
    background: rgba(21, 87, 36, 0.2);
}

.wichtel-toast.error .toast-close:hover {
    background: rgba(178, 34, 34, 0.2);
}

/* Mobile Responsive Optimizations */
@media (max-width: 768px) {
    /* Layout Adjustments */
    .modern-card {
        padding: 1.25rem;
        border-radius: 12px;
        margin: 0.5rem;
    }

    main .container {
        margin-top: 1rem;
    }

    .col-11 {
        width: 100%;
        padding: 0;
    }

    /* Typography Mobile */
    h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    h2 {
        font-size: 1.5rem;
        margin-top: 1.5rem;
        margin-bottom: 1rem;
    }

    h3 {
        font-size: 1.25rem;
        margin-top: 1rem;
        margin-bottom: 0.75rem;
    }

    /* Button Mobile */
    .btn {
        padding: 12px 20px;
        font-size: 1rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .btn-lg {
        padding: 14px 24px;
        font-size: 1.1rem;
    }

    .btn-sm {
        padding: 10px 16px;
        font-size: 0.9rem;
        width: auto;
    }

    /* Form Mobile */
    .form-control {
        padding: 14px 16px;
        font-size: 1rem;
        -webkit-appearance: none;
    }

    .form-section {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }

    /* Table Mobile */
    .table {
        font-size: 0.9rem;
        border-radius: 12px;
    }

    .table th,
    .table td {
        padding: 12px 8px;
    }

    .table th {
        font-size: 0.8rem;
    }

    /* Content Sections Mobile */
    .content-section {
        margin-bottom: 2rem;
    }

    /* Toast Mobile */
    .toast-container {
        left: 12px;
        right: 12px;
        bottom: 12px;
        max-width: none;
        min-width: auto;
    }

    .wichtel-toast {
        font-size: 14px;
        padding: 16px 18px;
    }

    /* Navigation Mobile */
    .navbar-brand {
        font-size: 1.2rem;
    }

    /* Touch Targets */
    .hoverable,
    button,
    .btn,
    a[role="button"] {
        min-height: 44px;
        min-width: 44px;
    }

    /* List Group Mobile */
    .list-group-item {
        padding: 16px;
    }

    /* Input Group Mobile */
    .input-group {
        flex-direction: column;
        border-radius: 10px;
    }

    .input-group .form-control {
        border-radius: 10px 10px 0 0;
        margin-bottom: 0;
    }

    .input-group-append .btn {
        border-radius: 0 0 10px 10px;
        width: 100%;
    }
}

/* Extra Small Mobile */
@media (max-width: 480px) {
    .modern-card {
        padding: 1rem;
        margin: 0.25rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    .table th,
    .table td {
        padding: 10px 6px;
    }

    .content-section {
        margin-bottom: 1.5rem;
    }
}