.min-width {
    white-space: nowrap !important;
    width: 1% !important;
}

.ranking-pos-width {
    white-space: nowrap !important;
    width: 1% !important;
    min-width: 3.5em;
}

/* Position and time columns in ranking table */
.position-column {
    width: 60px !important;
    min-width: 60px !important;
}

.time-column {
    width: 100px !important;
    min-width: 100px !important;
    white-space: nowrap !important;
}

/* Split times card styling */
.split-times-card {
    font-size: 0.9rem;
}

.split-time-row:not(:last-child) {
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

/* Toggle icons for expandable rows */
.text-toogle[aria-expanded=false] .text-expanded {
    display: none;
}

.text-toogle[aria-expanded=true] .text-collapsed {
    display: none;
}

/* DataTables styling */
.datatable-footer-item {
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
}

.dataTables_info {
    padding-top: unset !important;
}

/* Print styles */
@media all {
    .page-break { display: none; }
}

@media print {
    .page-break { display: block; page-break-before: always; }
}

/* Mobile-specific styles */
@media (max-width: 767.98px) {
    /* Make the main table more compact on mobile */
    #ranking_table th, 
    #ranking_table td {
        padding: 0.5rem 0.25rem;
    }

    /* Improve touch targets */
    #ranking_table tr[data-bs-toggle="collapse"] {
        cursor: pointer;
    }

    /* Make the position column narrower on mobile */
    .position-column {
        width: 50px !important;
        min-width: 50px !important;
    }

    /* Adjust card spacing in split times */
    .split-times-card .card {
        margin-bottom: 0.5rem !important;
    }

    /* Improve list group items for category selection */
    .list-group-item {
        padding: 0.75rem 0.5rem;
    }

    /* Make buttons more touch-friendly */
    .btn {
        padding: 0.5rem 0.75rem;
        margin-bottom: 0.25rem;
    }

    /* Sticky submit for mobile */
    .sticky-submit-mobile {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        padding: 1rem;
        box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
        z-index: 1050;
    }
    
    .sticky-submit-mobile .btn {
        width: 100%;
        margin-bottom: 0 !important;
    }

    /* Space for sticky button */
    #layoutSidenav_content {
        padding-bottom: 80px;
    }
}


.contest-row {
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.contest-live {

    border-left: 6px solid #e35d6a;
}

.contest-future-registration-open {

    border-left: 6px solid #198754;
}
.contest-future-registration-closed {

    border-left: 6px solid #0d6efd;
}
.contest-future-registration-in-future {

    border-left: 6px solid #ffc107;
}
.contest-past {

    border-left: 6px solid #6C757DFF;
}


.live-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.pulse-dot {
    margin-right: 0.5rem;
    animation: pulse-red 2s infinite;
}


.pulse-animation {
    animation: pulse-warning 2s infinite;
}


@keyframes pulse-red {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        opacity: 1;
    }
}


.option-card {
    padding: 1rem;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.option-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.option-icon-available {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 2px solid rgba(40, 167, 69, 0.3);
}

.option-icon-unavailable {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    border: 2px solid rgba(108, 117, 125, 0.3);
}

.option-icon-warning {
    background: rgba(var(--bs-warning-rgb), var(--bs-text-opacity));
    color: rgba(var(--bs-warning-rgb), var(--bs-text-opacity)) !important;
    border: 2px solid rgba(40, 167, 69, 0.3);
}



.option-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
@media (hover: hover) {
    .option-card:hover {
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        transform: translateY(-2px);
    }
}
.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #495057;
}
.option-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 1rem;
}
.option-icon-primary {
    background: linear-gradient(135deg, #0d6efd, #0056b3);
    color: white;
}
.option-icon-success {
    background: linear-gradient(135deg, #198754, #146c43);
    color: white;
}
.option-icon-info {
    background: linear-gradient(135deg, #0dcaf0, #087990);
    color: white;
}
.option-icon-warning {
    background: linear-gradient(135deg, #ffc107, #d39e00);
    color: white;
}

.data-label {
    font-weight: 600;
    color: #6c757d;
    font-size: 0.85rem;
    margin-bottom: 0.1rem;
}

.data-value {
    color: #212529;
    margin-bottom: 1rem;
}

/* Quantity Widget Styles */
.js-qty-row {
    transition: all 0.2s ease-in-out;
}

.js-qty-row .form-check-input {
    cursor: pointer;
    width: 1.5em;
    height: 1.5em;
    margin-top: 0;
}

.js-qty-row .form-check-label {
    cursor: pointer;
}

.js-qty-btn-minus, .js-qty-btn-plus {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.js-qty-btn-minus.btn-outline-danger {
    background-color: transparent;
    border-color: #dc3545;
    color: #dc3545;
}

.js-qty-btn-minus.btn-outline-danger:hover {
    background-color: #dc3545;
    color: white;
}

.js-qty-row.border-primary {
    border-width: 2px !important;
}

@media (max-width: 575.98px) {
    .js-qty-row {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .js-qty-row > .d-flex {
        width: 100%;
        justify-content: space-between;
        margin-top: 1rem;
        margin-left: 0 !important;
        padding-top: 1rem;
        border-top: 1px dashed #dee2e6;
    }

    .js-qty-display {
        font-size: 1.25rem;
    }
}