/* Ticket Type Card Styling */
.circuit-item {
    border: 2px solid #f1f1f1;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.circuit-item.active {
    border-color: #ffc107;
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.25);
}

.circuit-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.circuit-content {
    padding: 1.25rem !important;
}

/* Hide checkbox but keep functionality */
.circuit-item .form-check {
    padding: 0;
    margin: 0;
}

.circuit-item .form-check-input {
    display: none;
}

.circuit-item .form-check-label {
    width: 100%;
    margin: 0;
    cursor: pointer;
}

/* Circuit title styling */
.circuit-item h5 {
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1rem;
    color: #333;
}

/* Price styling */
.circuit-item .text-warning {
    font-size: 1.2rem;
    display: block;
    text-align: center;
    margin: 0.5rem 0;
}

/* Description styling */
.circuit-item .card-text {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    margin-bottom: 0;
}

/* Image styling */
.circuit-item .circuit-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px 6px 0 0;
}

/* Add-on Card Styles */
.addon-card {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s;
}

.addon-card:hover {
    transform: translateY(-2px);
}

.addon-image {
    height: 140px;
    object-fit: cover;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.quantity-selector {
    width: 100px;
    height: 32px;
}

.quantity-selector .btn {
    padding: 2px 8px;
    border: 1px solid #e2e8f0;
    background: white;
    color: #718096;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
}

.quantity-selector .btn-success {
    background: #00a76f;
    border-color: #00a76f;
    color: white;
}

.quantity-selector .btn:hover {
    opacity: 0.9;
}

.quantity-selector .btn i {
    font-size: 12px;
}

.quantity-selector .addon-quantity {
    height: 32px;
    border: 1px solid #e2e8f0;
    border-left: none;
    border-right: none;
    font-size: 14px;
    padding: 4px;
    width: 36px;
    text-align: center;
    background: white !important;
}

.quantity-selector input:focus {
    box-shadow: none;
    border-color: #e2e8f0;
}

/* Card Header Styles */
.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    padding: 1rem 1.25rem;
}

.card-header h5 {
    margin: 0;
    font-weight: 600;
    color: #2d3748;
}

/* General Card Styles */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}

.form-check-input:checked {
    background-color: #ffc107;
    border-color: #ffc107;
}

/* Price Text Styles */
.text-warning {
    color: #ffc107 !important;
}

.fw-bold {
    font-weight: 600 !important;
}

/* Summary Section Styles */
.summary-section {
    font-size: 14px;
}

.summary-section strong {
    font-size: 14px;
}

.summary-section .mb-3 strong {
    font-size: 1rem;
    font-weight: 700;
}

/* Summary Scrollable Area */
.summary-items-container {
    max-height: 180px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.summary-items-container::-webkit-scrollbar {
    width: 6px;
}

.summary-items-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.summary-items-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.summary-items-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Fixed Order Summary */
.order-summary-container {
    position: fixed;
    top: 4.5rem;
    right: calc((100% - 1200px) / 2);
    width: calc(1200px * 0.333333 - 1rem); /* Reduced width to create spacing */
    z-index: 100;
}

.order-summary-container .card {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 5rem);
}

.order-summary-container .card-body {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 0;
}

.order-summary-container .summary-bottom {
    padding: 1rem;
    background: white;
    border-top: 1px solid rgba(0, 0, 0, 0.125);
}

@media (max-width: 1200px) {
    .order-summary-container {
        right: 1rem;
        width: calc(33.333333% - 2rem); /* Reduced width to create spacing */
    }
}

@media (max-width: 991px) {
    .order-summary-container {
        position: relative;
        top: 0;
        right: auto;
        width: 100%;
        margin-top: 1rem; /* Add top margin for spacing in mobile view */
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .circuit-image {
        height: 160px;
    }

    .addon-image {
        height: 120px;
    }

    .card-body {
        padding: 1rem;
    }
}

/* Navbar text color override for this page */
.navbar-light .navbar-nav .nav-link {
    color: #000000 !important;
}

.navbar-light .navbar-nav .nav-link:hover {
    color: #ffa500 !important;
}

.navbar-light .navbar-nav .nav-link.active {
    color: #ffa500 !important;
}

.navbar-light .navbar-nav .dropdown-menu .dropdown-item {
    color: #000000 !important;
}

.navbar-light .navbar-nav .dropdown-menu .dropdown-item:hover {
    color: #ffa500 !important;
    background-color: rgba(255, 165, 0, 0.1);
}

.navbar-light .navbar-brand {
    color: #000000 !important;
}

.navbar-light .navbar-toggler-icon {
    filter: invert(1);
}

/* Navbar park name style */
.navbar-brand {
    display: flex;
    align-items: center;
}

.park-name {
    font-size: 1.2rem;
    font-weight: 500;
    color: #000000;
    position: relative;
    padding-left: 12px;
}

.park-name::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 2px;
    background-color: #e0e0e0;
}

.selected-circuit-item {
    background: #ffffff;
    border-bottom: 1px solid #e9ecef;
    padding: 15px 0;
}

.selected-circuit-item:last-child {
    border-bottom: none;
}

.selected-circuit-item h6 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.circuit-quantity {
    width: 40px !important;
    text-align: center;
    border-left: none;
    border-right: none;
    padding: 0.375rem 0.25rem;
}

.circuit-quantity:focus {
    box-shadow: none;
    border-color: #ced4da;
}

.input-group .btn {
    padding: 0.375rem 0.5rem;
}

/* Add these styles */
#summaryTime {
    margin-top: 2px;
}
#summaryVisitDate {
    margin-top: 2px;
}

#summaryTime .small {
    font-size: 0.875em;
    color: #6c757d;
    line-height: 1.4;
}

/* Modal Styles */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 1.5rem;
}

.modal-title {
    font-weight: 600;
    color: #2d3748;
}

.modal .form-control {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
}

.modal .form-control:focus {
    border-color: #ffa500;
    box-shadow: 0 0 0 0.2rem rgba(255, 165, 0, 0.25);
}

.modal .btn-close {
    opacity: 0.5;
    transition: opacity 0.2s;
}

.modal .btn-close:hover {
    opacity: 1;
}

.modal .btn-link {
    color: #ffa500;
    text-decoration: none;
}

.modal .btn-link:hover {
    color: #ff8c00;
    text-decoration: underline;
}

/* Add these styles for summary total animation */
#summaryTotal {
    transition: all 0.3s ease-out;
    position: relative;
    color: black;
}

#summaryTotal.increase {
    animation: valueIncrease 0.5s ease-out;
    color: #00a76f;
}

#summaryTotal.decrease {
    animation: valueDecrease 0.5s ease-out;
    color: #dc3545;
}

@keyframes valueIncrease {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes valueDecrease {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Update responsive modal styles */
@media (max-width: 768px) {
    .modal {
        padding: 0 !important; /* Remove padding */
    }

    .modal-dialog {
        margin: 0.5rem auto !important;
        width: 92% !important;
        max-width: none !important;
    }

    .modal-content {
        margin: 0 !important;
        border-radius: 12px !important;
        height: auto !important;
    }

    .modal-header {
        padding: 0.75rem 1rem !important;
    }

    .modal-body {
        padding: 1rem !important;
    }

    .modal-footer {
        padding: 0.75rem 1rem !important;
    }

    .modal .form-control {
        padding: 0.625rem 0.75rem !important;
        font-size: 14px !important;
        height: 42px !important;
    }

    .modal-title {
        font-size: 1.1rem !important;
    }

    .modal .btn {
        padding: 0.5rem 1rem !important;
        font-size: 14px !important;
        height: 42px !important;
    }

    /* Improve form spacing on mobile */
    .modal .mb-3 {
        margin-bottom: 0.75rem !important;
    }

    /* Adjust text sizes */
    .modal p,
    .modal label,
    .modal a {
        font-size: 0.875rem !important;
    }
}

/* Add tablet-specific adjustments */
@media (min-width: 769px) and (max-width: 991px) {
    .modal-dialog {
        max-width: 420px !important;
        margin: 1.75rem auto !important;
    }

    .modal-content {
        margin: 0 !important;
    }
}

/* Add these styles for mobile/tablet quantity controls */
@media (max-width: 991px) {
    .selected-circuit-item {
        background: #ffffff;
        padding: 0.75rem; /* Reduced padding */
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }

    .selected-circuit-item .d-flex {
        flex-direction: column;
        gap: 0.5rem; /* Reduced gap */
    }

    .selected-circuit-item h6 {
        font-size: 0.875rem;
        margin-bottom: 0.125rem;
    }

    .selected-circuit-item .text-warning {
        font-size: 1rem;
    }

    .selected-circuit-item .input-group {
        width: 100% !important;
        height: 36px; /* Reduced height */
    }

    .selected-circuit-item .input-group .btn {
        width: 36px; /* Reduced width */
        padding: 0.25rem;
        font-size: 1rem;
    }

    .selected-circuit-item .circuit-quantity {
        height: 36px;
        font-size: 0.875rem;
    }
}

/* Additional styles for tablets (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .selected-circuit-item {
        padding: 0.875rem;
    }

    .selected-circuit-item .d-flex {
        flex-direction: row;
        justify-content: space-between;
        align-items: left;
        gap: 0.75rem;
    }

    .selected-circuit-item .input-group {
        width: 120px !important; /* Reduced from 160px */
    }
}

/* Update base quantity control styles (desktop) */
.selected-circuit-item .input-group {
    width: 100px !important; /* Reduced from 120px */
    height: 36px; /* Reduced height */
}

.selected-circuit-item .input-group .btn {
    width: 32px; /* Reduced from 48px */
    padding: 0.25rem;
    font-size: 0.875rem;
}

.selected-circuit-item .circuit-quantity {
    height: 36px;
    font-size: 0.875rem;
    padding: 0.25rem;
    width: 36px !important;
}

/* Combo Circuit Styles */
.combo-circuit {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.25rem;
    background-color: #f8fafc;
}

.combo-circuit h6 {
    color: #334155;
    font-weight: 600;
    margin-bottom: 1rem;
}

.combo-circuit .alert-info {
    background-color: rgba(13, 110, 253, 0.1);
    border: none;
    border-radius: 6px;
    margin-bottom: 1.25rem;
}

.circuit-component {
    background: white;
    border-radius: 6px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border-left: 3px solid #0d6efd;
}

.circuit-component:not(:last-child) {
    margin-bottom: 1rem;
}

.circuit-component .form-label {
    margin-bottom: 0.5rem;
}

.circuit-component .badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
}

.circuit-component .form-select {
    border-color: #e2e8f0;
}

.circuit-component .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Responsive styles for combo circuits */
@media (max-width: 768px) {
    .combo-circuit {
        padding: 1rem;
    }

    .circuit-component {
        padding: 0.75rem;
    }
}

/* Reservation Timer Styles */
.reservation-timer {
    transition: all 0.3s ease;
}

.reservation-timer .alert {
    margin-bottom: 0;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background-color: #e3f2fd;
    border: 1px solid #90caf9;
}

.reservation-timer .alert i {
    font-size: 1.25rem;
    color: #1976d2;
}

#reservationTimer {
    font-family: "Courier New", monospace;
    font-weight: bold;
    color: #1976d2;
    font-size: 1.1rem;
}

#reservationTimer.warning {
    color: #f57c00;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}
