/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Navigation */
/* Navigation */
.navbar {
    background: #231f20;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    border-bottom: 3px solid #d4af37;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.guild-logo {
    height: 40px;
    width: auto;
}

.guild-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #2c1810;
    background: rgba(212, 175, 55, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Main container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

h2 {
    margin-bottom: 2rem;
    color: #2c3e50;
    text-align: center;
}

/* Loading and error states */
.loading {
    text-align: center;
    padding: 2rem;
    font-size: 1.2rem;
    color: #666;
}

.error {
    text-align: center;
    padding: 2rem;
    color: #e74c3c;
    background-color: #fdf2f2;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 1rem 0;
}

.no-results {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

/* Beer grid for on-tap page */
.beer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.beer-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.beer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.beer-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
    background-color: #f8f9fa;
}

.beer-name {
    font-size: 1.4rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.beer-type {
    color: #3498db;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.beer-description {
    color: #666;
    margin-bottom: 1rem;
    font-style: italic;
}

.beer-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.beer-abv {
    background: #e8f5e8;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

.beer-awards {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.award-badge {
    font-size: 1.2rem;
    font-weight: bold;
    margin-left: 0.2rem;
}

.award-icon {
    width: 40px;
    height: 40px;
    margin-right: 0.3rem;
}

.beer-list-awards {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Filters */
.filters {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.filter-group label {
    margin-bottom: 0.3rem;
    font-weight: 600;
    color: #555;
}

.filter-group input,
.filter-group select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

/* Beer list for inventory page */
.beer-list {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Screen grouping for On Tap page */
.screen-group {
    margin-bottom: 2rem;
    border: 3px solid #2c1810;
    border-radius: 12px;
    padding: 1rem;
    background: linear-gradient(145deg, #f9f9f9 0%, #ffffff 100%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: relative;
}

.screen-group::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(135deg, #2c1810 0%, #8b4513 30%, #d4af37 70%, #2c1810 100%);
    border-radius: 12px;
    z-index: -1;
}

.screen-header {
    background: linear-gradient(135deg, #2c1810 0%, #8b4513 30%, #d4af37 100%);
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
    padding: 0.8rem 1.5rem;
    margin: 0 0 1rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.screen-beers {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.beer-list-header-row {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr 1fr 1fr 1fr;
    gap: 1rem;
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    padding: 1rem 1.5rem;
    font-weight: bold;
    color: #495057;
}

.header-cell {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-cell.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
    position: relative;
    padding-right: 20px;
}

.header-cell.sortable:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.sort-arrow {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.3;
    font-size: 0.8rem;
}

.sort-arrow::after {
    content: "↕";
}

.header-cell.sort-asc .sort-arrow {
    opacity: 1;
}

.header-cell.sort-asc .sort-arrow::after {
    content: "↑";
}

.header-cell.sort-desc .sort-arrow {
    opacity: 1;
}

.header-cell.sort-desc .sort-arrow::after {
    content: "↓";
}

.beer-list-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s;
}

.beer-list-item:hover {
    background-color: #f8f9fa;
}

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

.beer-list-header {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr 1fr 1fr 1fr auto;
    gap: 1rem;
    align-items: center;
}

/* On-tap specific layout with image */
.beer-list-header-ontap {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1rem;
    align-items: center;
}

.beer-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.beer-list-image {
    max-width: 90px;
    max-height: 90px;
    object-fit: cover;
    border-radius: 8px;
    background-color: #f8f9fa;
}

.beer-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.beer-details-mobile {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.beer-list-name {
    font-weight: bold;
    color: #2c3e50;
    font-size: 1.1rem;
}

.beer-list-brewery {
    color: #3498db;
    font-weight: 600;
}

.beer-list-type {
    color: #666;
}

.beer-list-description {
    color: #666;
    font-style: italic;
}

a {
  text-decoration: none;
  color: inherit;  /* Inherits color from the parent element */
}

.beer-list-abv {
    background: #e8f5e8;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-weight: bold;
    font-size: 0.9rem;
    text-align: center;
    width: fit-content;
}

.beer-list-awards {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Responsive design */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .guild-title {
        font-size: 1.2rem;
    }
    
    .guild-logo {
        height: 32px;
    }

    .nav-menu {
        gap: 0.5rem;
        width: 100%;
        justify-content: center;
    }

    .nav-link {
        padding: 0.6rem 1rem;
        font-size: 1rem;
    }

    .container {
        padding: 1rem;
    }

    /* Mobile-friendly filters */
    .filters {
        /*flex-direction: column;*/
        gap: 1rem;
    }

    .filter-group {
        min-width: 100%;
    }

    /* Mobile inventory table */
    .beer-list-header-row {
        display: none; /* Hide column headers on mobile */
    }

    .beer-list-header {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 0.5rem 0;
    }

    .beer-list-header > div {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.3rem 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .beer-list-header > div:last-child {
        border-bottom: none;
    }

    /* Add labels for mobile */
    .beer-list-name::before { content: " "; font-weight: bold; color: #666; }
    .beer-list-brewery::before { content: "Brewery: "; font-weight: bold; color: #666; }
    .beer-list-type::before { content: "Style: "; font-weight: bold; color: #666; }
    .beer-list-description::before { content: "Description: "; font-weight: bold; color: #666; }
    .beer-list-abv::before { content: "ABV: "; font-weight: bold; color: #666; }
    .beer-list-awards:not(:empty)::before { content: "Awards: "; font-weight: bold; color: #666; }


    .beer-inventory-name::before { content: "Beer: "; font-weight: bold; color: #666; }
    .beer-inventory-brewery::before { content: "Brewery: "; font-weight: bold; color: #666; }
    .beer-inventory-type::before { content: "Style: "; font-weight: bold; color: #666; }
    .beer-inventory-description::before { content: "Description: "; font-weight: bold; color: #666; }
    .beer-inventory-abv::before { content: "ABV: "; font-weight: bold; color: #666; }
    .beer-inventory-awards:not(:empty)::before { content: "Awards: "; font-weight: bold; color: #666; }

    /* Mobile on-tap layout */
    .beer-list-header-ontap {
        grid-template-columns: 60px 1fr;
        gap: 1rem;
    }

    .beer-list-image {
        max-width: 65px;
        max-height: 65px;
    }

    .beer-list-item {
        padding: 1rem;
    }

    /* Mobile-specific beer info layout */
    .beer-info {
        gap: 0.2rem;
    }

    .beer-list-name {
        font-size: 1.1rem;
        font-weight: bold;
    }

    .beer-list-type {
        font-size: 0.9rem;
        color: #3498db;
    }

    .beer-list-description {
        font-size: 0.85rem;
        color: #666;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .guild-title {
        font-size: 1rem;
    }
    
    .guild-logo {
        height: 28px;
    }
    
    .nav-menu {
        gap: 0.5rem;
    }

    .nav-link {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }

    .container {
        padding: 0.5rem;
    }

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

    .filters {
        padding: 1rem;
    }

    .beer-list-item {
        padding: 0.8rem;
    }

    .beer-list-header-ontap {
        grid-template-columns: 45px 1fr;
        gap: 0.8rem;
    }

    .beer-list-image {
        max-width: 65px;
        max-height: 65px;
    }
}
