/* Live Beer List Styles */
/* Refresh indicator */
.bfm-live-beer-list-container .bfm-refresh-indicator {
    text-align: center !important;
    font-size: 12px;
    color: #FFFFFF;
    margin-bottom: 10px;
    padding: 5px 10px 10px;
    /*background-color: #f8f8f8;*/
    border-radius: 3px;
    display: block !important; /* Ensure it's block level */
    width: 100% !important; /* Ensure full width */
}

.bfm-refresh-indicator .bfm-refresh-text {
    text-align: center !important;
    /*margin-right: 5px;*/
}

.bfm-refresh-time {
    font-weight: bold;
}

/* Refresh confirmation at top of screen */
.bfm-refresh-notification {
    display: none; /* Hide */
    position: fixed;
    top: 20px;
    right: 20px;
    background: #4CAF50;
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    z-index: 10000;
}

.bfm-refresh-notification.bfm-show {
    opacity: 1;
    transform: translateY(0);
}

/* Refreshing Beer List message - centered on screen */
.bfm-beer-list-container.bfm-loading {
    opacity: 0.7;
    position: relative;
}

.bfm-beer-list-container.bfm-loading::after {
    content: "Refreshing beer list...";
    position: fixed;
    top: 50vh;
    left: 50vw;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 16px;
    z-index: 10000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: 1px solid #4CAF50;
    font-weight: 500;
    text-align: center; /* Add this to center the text */
    white-space: nowrap; /* Prevent text wrapping entirely */
}

.bfm-controls {
    margin-bottom: 20px;
}

/* Search Box */
.bfm-search-container {
    position: relative;
    margin-bottom: 15px;
}

.bfm-controls .bfm-search-container .bfm-search {
    width: 100%;
    padding: 12px 40px 12px 35px !important;
    border: 1px solid #ddd !important;
    border-radius: 5px !important;
    font-size: 16px;
    box-sizing: border-box;
    color: #000 !important;
    background: #fff !important;
    height: auto !important;
    transition: border-color 0.2s ease;
}

.bfm-search:focus {
    outline: none;
    border-color: #4CAF50 !important;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1) !important;
}

.bfm-search::placeholder {
    color: #999;
}

.bfm-controls .bfm-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    width: 16px;
    height: 16px;
    pointer-events: none;
}

.bfm-controls .bfm-search-icon::before {
    content: "";
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid currentColor;
    border-radius: 50%;
    top: 0;
    left: 0;
}

.bfm-controls .bfm-search-icon::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 2px;
    background: currentColor;
    transform: rotate(45deg);
    bottom: 1px;
    right: 1px;
}

.bfm-clear-search {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    cursor: pointer;
    font-size: 18px;
    width: 40px; /* Increased from 20px */
    height: 40px; /* Increased from 20px */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    z-index: 5; /* Ensure it's above the input */
}

/* Optional: Add touch-friendly hover state */
.bfm-clear-search:hover {
    color: #666;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
}

.bfm-no-results {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: #666;
    font-style: italic;
}

/* Sort and Filter Buttons */
.bfm-controls .bfm-control-buttons {
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.bfm-controls .bfm-sort-btn,
.bfm-controls .bfm-filter-btn {
    flex: 0 0 auto !important;
    width: 120px !important;
    padding: 10px !important;
    border: 1px solid #ddd !important;
    border-radius: 5px !important;
    background: #fff !important;
    cursor: pointer;
    font-size: 14px;
    text-align: center !important;
    color: #000 !important;
    height: auto !important;
}

.bfm-controls .bfm-sort-btn {
    margin-right: auto !important;
}

.bfm-controls .bfm-filter-btn {
    margin-left: auto !important;
}

.bfm-sort-dialog,
.bfm-filter-dialog {
    position: absolute;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 100;
    width: 100%;
    box-sizing: border-box;
    margin-top: 10px;
}

.bfm-sort-options,
.bfm-filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bfm-sort-option,
.bfm-filter-option {
    padding: 8px 12px;
    border: 1px solid #eee;
    border-radius: 4px;
    cursor: pointer;
}

.bfm-sort-option:hover,
.bfm-filter-option:hover {
    background: #f5f5f5;
}

.bfm-filter-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.bfm-filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.bfm-filter-section h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
}

/* Beer List */
.bfm-beer-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bfm-beer-item {
    display: flex;
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.bfm-beer-details {
    flex: 5; /* 75% on desktop */
    padding-right: 20px;
}

.bfm-availability {
    flex: 1; /* 25% on desktop */
    display: flex;
    flex-direction: column;
    padding: 0; 
    /* border: 3px solid #000; 
    /* border-radius: 5px; */
    overflow: hidden; 
}

.bfm-brewery {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 5px;
    /*color: #333;*/
    color: #00B3C4;
}

.bfm-beer-name {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 8px;
    color: #555;
}

.bfm-beer-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: bold;
    color: #666;
}

.bfm-beer-description {
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.4;
    color: #666;
}

.bfm-dietary-info {
    display: flex;
    gap: 10px;
}

.bfm-vegan {
    padding: 3px 8px;
    /* background: #f0f0f0; */
    background: #A2AD00;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    /* color: #666; */
    color: #FFFFFF;
}

.bfm-gluten-free {
    padding: 3px 8px;
    /* background: #f0f0f0; */
    background: #EEAF00;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    /* color: #666; */
    color: #FFFFFF;
}

.bfm-no-beers {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #666;
}

/* Availability styling */
.bfm-availability-heading {
    font-weight: bold;
    padding: 0px 5px 8px 5px;
    text-align: center;
    /*border-bottom: 1px solid #000; /* Black border bottom */
    font-size: 14px;
    color: #000; /* Black text */
    /*background-color: #f8f8f8; */ /* Light gray background */
    background-color: #ffffff; /* White background */
}

.bfm-availability.available .bfm-availability-heading {
    /*border-bottom-color: #4CAF50;*/
    /*background-color: rgba(76, 175, 80, 0.05);*/
}

.bfm-availability.running-low .bfm-availability-heading {
    /*border-bottom-color: #FF9800;*/
    /*background-color: rgba(255, 152, 0, 0.05);*/
}

.bfm-availability.finished .bfm-availability-heading {
    /*border-bottom-color: #F44336;*/
    /*background-color: rgba(244, 67, 54, 0.05);*/
}

/* AVAILABLILTY OPTION 1: Text-based Status */


.bfm-status-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1; 
    padding: 10px 5px;
/*    border: 3px solid; */
    border: 7px solid;
    border-radius: 5px;
    max-height: 55px;
}

.bfm-availability.available .bfm-status-container {
    border-color: #4CAF50; 
}

.bfm-availability.running-low .bfm-status-container {
    border-color: #FF9800; 
}

.bfm-availability.finished .bfm-status-container {
    border-color: #F44336; 
}

.bfm-availability.available,
.bfm-availability.running-low,
.bfm-availability.finished {
    border-color: #000; 
    color: inherit; 
}

.bfm-status {
    text-align: center;
	font-size: 16px;
    font-weight: 500;
}

.bfm-availability.available .bfm-status {
    color: #4CAF50; 
}

.bfm-availability.running-low .bfm-status {
    color: #FF9800; 
}

.bfm-availability.finished .bfm-status {
    color: #F44336; 
}


/* AVAILABLILTY OPTION 2: Graphical Status */
/*
.bfm-barrel-container {
    display: flex;
    flex-direction: column;
    align-items: center; 
    justify-content: center; 
    padding: 5px;
    width: 100%; 
}

.bfm-barrel-image {
    width: 75px;
    height: 75px;
    object-fit: contain;
    margin: 5px 0;
    display: block; 
}

.bfm-status-fallback {
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 5px;
    display: none;
}
*/
/* Show/hide based on body class */
/* NOT NEEDED
body.bfm-option-1 .bfm-option-2,
body.bfm-option-2 .bfm-option-1 {
    display: none !important;
}

body.bfm-option-1 .bfm-option-1,
body.bfm-option-2 .bfm-option-2 {
    display: flex;
}*/

/* Default to Option 2 (graphical) */
/* NOT NEEDED
.bfm-option-1 {
    display: none !important;
}

.bfm-option-2 {
    display: flex;
}

/* If you want to default to Option 1 instead, swap these:*/
.bfm-option-1 {
    display: flex;
}

.bfm-option-2 {
    display: none !important;
}


/* Responsive adjustments */
@media (max-width: 768px) {
    .bfm-beer-item {
        /* Keep side-by-side layout but adjust ratio to 60:40 */
        flex-direction: row;
    }
    
    .bfm-beer-details {
        flex: 4; 
        padding-right: 15px;
    }
    
    .bfm-availability {
        flex: 1; 
        flex-direction: column;
    }
    
    .bfm-availability-heading {
        padding: 0px 3px 6px 3px;
        font-size: 12px;
    }
    
    .bfm-status {
        font-size: 14px;
    }
    
    .bfm-status-container {
        padding: 8px 3px;
    }
}

@media (max-width: 480px) {
    .bfm-control-buttons {
        flex-direction: column;
    }
    
    .bfm-beer-meta {
/*        flex-direction: column; */
/*        gap: 5px; */
    }
    
    .bfm-dietary-info {
        flex-wrap: wrap;
    }
    
    /* Further adjustments for very small screens */
    .bfm-beer-item {
        padding: 15px;
    }
    
    .bfm-beer-details {
        flex: 3; 
        padding-right: 10px;
    }
    
    .bfm-brewery {
        font-size: 16px;
    }
    
    .bfm-beer-name {
        font-size: 14px;
    }
    
    .bfm-availability {
        flex: 1; 
        flex-direction: column;
    }
    
    .bfm-availability-heading {
        font-size: 11px;
        padding: 0px 2px 5px 2px;
    }
    
    .bfm-status {
        font-size: 12px;
        line-height: 15px;
    }
    
    .bfm-status-container {
        padding: 5px 2px; 
    }
}