/* Beer-themed dark color scheme */
:root {
    --dark-bg: #1a1410;
    --darker-bg: #0f0a08;
    --beer-yellow: #f4a535;
    --beer-gold: #d4860f;
    --foam-white: #faf9f6;
    --accent-amber: #cc7a00;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--darker-bg) 0%, var(--dark-bg) 100%);
    color: var(--foam-white);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: rgba(26, 20, 16, 0.95);
    border-bottom: 3px solid var(--beer-gold);
    padding: 1.5rem 0;
    box-shadow: 0 4px 20px rgba(244, 165, 53, 0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}

.header-left {
    flex: 1;

    & h1 {
        color: var(--beer-yellow);
        font-size: 2.5rem;
        text-shadow: 0 0 20px rgba(244, 165, 53, 0.5);
        margin-bottom: 0.25rem;
    }
}

.tagline {
    color: var(--foam-white);
    font-size: 1rem;
    opacity: 0.9;
}

.header-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.btn-location-header,
.btn-map-header {
    background: linear-gradient(135deg, var(--beer-gold) 0%, var(--accent-amber) 100%);
    color: var(--darker-bg);
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 3px 12px rgba(244, 165, 53, 0.4);

    &:hover {
        background: linear-gradient(135deg, var(--beer-yellow) 0%, var(--beer-gold) 100%);
        box-shadow: 0 5px 18px rgba(244, 165, 53, 0.6);
    }
}

/* Main Content */
main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.search-section {
    background: rgba(26, 20, 16, 0.8);
    border: 2px solid var(--beer-gold);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.search-box {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Inline Search Form */
.search-form-inline {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--darker-bg);
    border: 2px solid var(--beer-gold);
    border-radius: 8px;
    color: var(--foam-white);
    font-size: 1rem;
    transition: all 0.3s ease;

    &::placeholder {
        color: var(--beer-gold);
        opacity: 0.6;
    }

    &:focus {
        outline: none;
        border-color: var(--beer-yellow);
        box-shadow: 0 0 10px rgba(244, 165, 53, 0.3);
    }
}

.radius-select {
    padding: 0.75rem 1rem;
    background: var(--darker-bg);
    border: 2px solid var(--beer-gold);
    border-radius: 8px;
    color: var(--foam-white);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;

    &:focus {
        outline: none;
        border-color: var(--beer-yellow);
        box-shadow: 0 0 10px rgba(244, 165, 53, 0.3);
    }

    & option {
        background: var(--darker-bg);
        color: var(--foam-white);
    }
}

.btn-search {
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, var(--beer-gold) 0%, var(--accent-amber) 100%);
    color: var(--darker-bg);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 3px 12px rgba(244, 165, 53, 0.4);

    &:hover {
        background: linear-gradient(135deg, var(--beer-yellow) 0%, var(--beer-gold) 100%);
        box-shadow: 0 5px 18px rgba(244, 165, 53, 0.6);
    }
}

/* Location Display */
.location-display {
    background: rgba(244, 165, 53, 0.1);
    border: 1px solid var(--beer-gold);
    border-radius: 6px;
    padding: 0.75rem;
    text-align: center;
    color: var(--beer-yellow);
    font-size: 0.95rem;

    & strong {
        color: var(--foam-white);
    }
}

.hidden {
    display: none !important;
}

/* Form Elements */
.form-group {
    display: flex;
    flex-direction: column;

    & label {
        color: var(--beer-yellow);
        margin-bottom: 0.5rem;
        font-weight: 500;
    }

    & input {
        padding: 0.75rem;
        background: var(--darker-bg);
        border: 2px solid var(--beer-gold);
        border-radius: 6px;
        color: var(--foam-white);
        font-size: 1rem;
        transition: all 0.3s ease;

        &:focus {
            outline: none;
            border-color: var(--beer-yellow);
            box-shadow: 0 0 10px rgba(244, 165, 53, 0.3);
        }
    }
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--beer-gold) 0%, var(--accent-amber) 100%);
    color: var(--darker-bg);
    box-shadow: 0 3px 12px rgba(244, 165, 53, 0.4);

    &:hover {
        background: linear-gradient(135deg, var(--beer-yellow) 0%, var(--beer-gold) 100%);
        transform: translateY(-2px);
        box-shadow: 0 5px 18px rgba(244, 165, 53, 0.6);
    }
}

/* Results Section */
.results-section {
    min-height: 200px;
}

.pub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;

    & h3 {
        grid-column: 1 / -1;
        color: var(--beer-yellow);
        font-size: 1.5rem;
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
        border-bottom: 2px solid var(--beer-gold);
    }
}

.pub-card {
    background: rgba(26, 20, 16, 0.9);
    border: 2px solid var(--beer-gold);
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);

    &:hover {
        transform: translateY(-5px);
        border-color: var(--beer-yellow);
        box-shadow: 0 8px 25px rgba(244, 165, 53, 0.4);
    }
}

.pub-name {
    color: var(--beer-yellow);
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.map-link {
    color: var(--beer-gold);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    text-decoration: none;
    opacity: 0.7;

    & svg {
        display: block;
    }

    &:hover {
        opacity: 1;
        color: var(--beer-yellow);
        transform: scale(1.15);
    }
}

.pub-address {
    color: var(--foam-white);
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.pub-hours {
    color: var(--beer-gold);
    margin-bottom: 0.5rem;
    font-style: italic;
}

.pub-coords {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(244, 165, 53, 0.3);

    & small {
        color: var(--foam-white);
        opacity: 0.6;
        font-family: monospace;
    }
}

/* Loading and Messages */
.loading,
.error,
.no-results {
    background: rgba(26, 20, 16, 0.8);
    border: 2px solid var(--beer-gold);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    font-size: 1.2rem;
}

.loading {
    color: var(--beer-yellow);
}

.error {
    color: #ff6b6b;
    border-color: #ff6b6b;
}

.no-results {
    color: var(--foam-white);
}

/* Map Modal */
.map-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.map-modal-content {
    background: var(--dark-bg);
    border: 3px solid var(--beer-gold);
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    height: 80vh;
    max-height: 700px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 50px rgba(244, 165, 53, 0.5);
}

.map-modal-header {
    padding: 1rem 1.5rem;
    background: rgba(26, 20, 16, 0.95);
    border-bottom: 2px solid var(--beer-gold);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;

    & h3 {
        color: var(--beer-yellow);
        font-size: 1.4rem;
        margin: 0;
    }
}

.map-close-btn {
    background: none;
    border: none;
    color: var(--beer-yellow);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 4px;

    &:hover {
        background: rgba(244, 165, 53, 0.2);
        transform: scale(1.1);
    }
}

.map-container {
    flex: 1;
    width: 100%;
    position: relative;
    background: var(--darker-bg);
}

.map-modal-footer {
    padding: 1rem 1.5rem;
    background: rgba(26, 20, 16, 0.95);
    border-top: 2px solid var(--beer-gold);
    border-radius: 0 0 12px 12px;
}

.map-instruction {
    color: var(--beer-yellow);
    text-align: center;
    margin: 0;
    font-size: 0.95rem;
}

/* Footer */
footer {
    background: rgba(26, 20, 16, 0.95);
    border-top: 3px solid var(--beer-gold);
    padding: 2rem 0;
    margin-top: 3rem;

    & p {
        text-align: center;
        color: var(--foam-white);
        opacity: 0.8;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        padding: 1rem 0;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .header-left h1 {
        font-size: 1.75rem;
    }

    .tagline {
        font-size: 0.9rem;
    }

    .header-buttons {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    .btn-location-header,
    .btn-map-header {
        padding: 0.6rem 0.85rem;
        font-size: 0.8rem;
        width: 100%;
    }

    main {
        padding: 1rem 0;
    }

    .search-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .pub-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .pub-card {
        padding: 1rem;
    }

    .btn {
        padding: 0.65rem 1rem;
        font-size: 0.9rem;
    }

    .search-form-inline {
        flex-direction: column;
        gap: 0.5rem;
    }

    .search-input,
    .radius-select,
    .btn-search {
        width: 100%;
        padding: 0.65rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .header-left h1 {
        font-size: 1.5rem;
    }

    .search-section {
        padding: 0.75rem;
    }

    .pub-name {
        font-size: 1.1rem;
    }
}
