/* 
 * Promotions List Styling
 * Updated for accessibility and AJAX loading
 */

/* Screen reader only class */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Loading animation */
.loading-promotions {
    text-align: center;
    padding: 40px 0;
    position: relative;
    min-height: 100px;
}

.loading-promotions p {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
}

.loading-promotions:after {
    content: '';
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid #0E6AB5;
    border-color: #0E6AB5 transparent #0E6AB5 transparent;
    animation: loading-spin 1.2s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -20px;
    margin-left: -20px;
}

@keyframes loading-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Error message */
.error {
    color: #721c24;
    background-color: #f8d7da;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    text-align: center;
}

/* Tab styles - updated class names */
ul.promotional-tabs {
    margin: 2em auto;
    display: flex;
    list-style: none;
    padding: 0;
    overflow: hidden;
    border-radius: 4px;
}

.promotional-tabs li {
    padding: 12px;
    font-size: 1em;
    width: 33.33%;
    list-style: none;
    border-right: 1px solid #ddd;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #333;
}

.promotional-tabs li a {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 5px;
}

.promotional-tabs li.active,
.promotional-tabs li.active a {
    color: #0E6AB5;
    background-color: #f5f9fc;
    font-weight: bold;
}

.promotional-tabs li:hover:not(.active),
.promotional-tabs li:focus-within:not(.active) {
    background-color: #f9f9f9;
}

.promotional-tabs li a:focus {
    outline: 2px solid #0E6AB5;
    outline-offset: -2px;
}

/* Mobile filter */
.promotion_mobile_filter {
    display: none;
    margin-bottom: 20px;
}

.promotion_tab_mobile_dropdown {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Promotion card styles */
.pro_items_out {
    display: inline-block;
    height: 100%;
    width: 92%;
    border-style: solid;
    border-color: #00BCD4;
    border-width: 10px 10px 10px 10px;
    border-radius: 0 100px 0 100px;
    margin-left: 10px;
}

.pro_items {
    padding: 3%;
}

.protitle {
    font-weight: bold;
    margin-top: 10px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 18px;
}

a.orderlink {
    text-align: center;
    display: inline-block;
    background-color: #0E6AB5;
    color: #fff;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: bold;
    text-decoration: none;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

a.orderlink:hover,
a.orderlink:focus {
    background-color: #084d8a;
    text-decoration: none;
    color: #fff;
}

/* Carousel controls */
.carousel-controls {
    text-align: center;
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.carousel-prev,
.carousel-next {
    background-color: #0E6AB5;
    color: #fff;
    border: 3px solid #0E6AB5;
    padding: 15px;
    font-size: 20px;
    margin: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background-color 0.3s ease;
    border-radius: 50%;
    cursor: pointer;
    min-width: 50px;
    min-height: 50px;
}

.carousel-prev:hover,
.carousel-next:hover,
.carousel-prev:focus,
.carousel-next:focus {
    background-color: #084d8a;
    border-color: #084d8a;
    outline: none;
}

/* SVG arrow styling */
.carousel-prev svg,
.carousel-next svg {
    width: 24px;
    height: 24px;
    stroke: #ffffff;
    stroke-width: 2;
    display: block;
}

/* Special class for highlighting */
.active-promo-orange {
    background-color: #ffeecc;
}

/* Valid message */
.valid_message {
    margin-bottom: 20px;
}

.valid_message p {
    font-style: italic;
    color: #666;
}

/* Responsive styles */
@media (max-width: 768px) {
    .promotion_desktop_filter {
        display: none;
    }
    
    .promotion_mobile_filter {
        display: block;
    }
}

/* Carousel container and slider */
.carousel-container {
    position: relative;
    margin-bottom: 30px;
}

/* Slick overrides for accessibility */
.slider {
    position: relative;
    display: block;
    overflow: hidden;
}

.slick-list {
    overflow: hidden;
    margin: 0;
    padding: 0;
    position: relative;
    display: block;
}

.slick-track {
    height: fit-content;
    display: flex;
    position: relative;
    top: 0;
    left: 0;
    margin-left: auto;
    margin-right: auto;
}

.slick-slide {
    height: auto;
    float: left;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    min-height: 1px;
}

.promotion-item {
    padding: 0 10px;
    box-sizing: border-box;
    display: flex !important;
    flex-direction: column;
    justify-content: stretch;
    height: 100%;
}

/* Add focus styles for keyboard navigation */
a:focus,
button:focus,
select:focus {
    outline: 2px solid #0E6AB5;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px rgba(14, 106, 181, 0.3);
} 
