/* =========================
   styles.css
   ========================= */

/* Base styles */
html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: Arial, sans-serif;
    text-align: center;
    font-size: 1rem;
    margin: 0;
    padding: 0;
    line-height: 1.5;
    color: #333;
}

/* Slot machine styles */
.slot-machine {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    gap: 20px;
}

.reel {
    width: 150px;
    height: 150px;
    border: 2px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background-color: #f5f5f5;
    overflow: hidden;
    position: relative;
    border-radius: 4px;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

.reel.spin {
    animation: none;
    background-color: #eef5ff;
}

.reel.spin::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(74, 144, 226, 0.1);
}

/* Button styles */
button {
    padding: 10px 16px;
    font-size: 1rem;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    margin: 4px;
}

button:hover:not(:disabled) {
    background-color: #357abd;
}

button:active:not(:disabled) {
    transform: translateY(1px);
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Rigging options container */
.rig-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 20px auto;
    max-width: 1200px;
    padding: 0 20px;
}

.rig-options h3 {
    display: none; /* Hide original headers - replaced by .rig-section-header */
}

.rig-section-header {
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 4px;
    margin-bottom: 10px;
    font-weight: bold;
}

.rig-section-header::after {
    content: '▼';
    transition: transform 0.3s ease;
}

.rig-section-header.expanded::after {
    transform: rotate(180deg);
}

.rig-options div {
    text-align: left;
    flex: 1 1 300px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.rig-section-content {
    display: none;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.rig-options label {
    font-size: 1rem;
    line-height: 1.8;
    display: inline-block;
    cursor: pointer;
    transition: color 0.2s ease;
}

.rig-options label:hover {
    color: #4a90e2;
}

/* "Select All" / "Clear All" container */
.rig-select-clear {
    margin-bottom: 10px;
    text-align: right;
}

/* Restaurant display */
#restaurant-name {
    margin-top: 30px;
    font-size: 1.75rem;
    color: #333;
    font-weight: bold;
}

#restaurant-address {
    margin: 8px 0 0 0;
    font-size: 1.125rem;
    color: #666;
}

#restaurant-website {
    margin: 8px 0 20px 0;
    font-size: 1rem;
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s ease;
}

#restaurant-website:hover {
    color: #004999;
    text-decoration: underline;
}

/* Neighborhood Tree Styles */
#neighborhood-tree {
    margin: 20px auto;
    max-width: 800px;
    padding: 20px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sub-container {
    margin-left: 24px;
    display: none;
    transition: all 0.3s ease;
}

.parent-label {
    cursor: pointer;
    font-weight: 600;
    user-select: none;
    margin-left: 6px;
    transition: color 0.2s ease;
}

.parent-label:hover {
    color: #4a90e2;
}

.expand-icon {
    cursor: pointer;
    margin-right: 5px;
    display: inline-block;
    width: 16px;
    text-align: center;
    transition: transform 0.2s ease;
}

.expanded .expand-icon {
    transform: rotate(90deg);
}

.neighborhood-checkbox {
    margin-left: 8px;
    cursor: pointer;
}

/* Result container styles */
.result-container {
    margin: 20px auto;
    width: 100%;
    max-width: 600px;
    height: 120px;
    border: 2px solid #333;
    background-color: #f9f9f9;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    border-radius: 8px;
    padding: 15px;
}

#scrolling-result {
    width: 100%;
    text-align: center;
    position: relative;
    animation: scrollText 0.5s linear infinite;
}

@keyframes scrollText {
    0% { transform: translateY(50%); opacity: 0; }
    20% { transform: translateY(0); opacity: 1; }
    80% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(-50%); opacity: 0; }
}

.result-container.final #scrolling-result {
    animation: none;
    transform: translateY(0);
    opacity: 1;
}

#scrolling-result a {
    color: #4a90e2;
    text-decoration: none;
}

#scrolling-result a:hover {
    text-decoration: underline;
}

#scrolling-result strong {
    display: block;
    font-size: 1.2em;
    margin-bottom: 5px;
}

/* Media Queries */
@media (max-width: 480px) {
    .reel {
        width: 90px;
        height: 90px;
        font-size: 0.875rem;
        padding: 5px;
    }

    .rig-options div {
        flex: 1 1 100%;
        margin: 10px 0;
    }

    button {
        padding: 8px 12px;
        font-size: 0.875rem;
    }

    #restaurant-name {
        font-size: 1.25rem;
    }

    #restaurant-address {
        font-size: 1rem;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .reel {
        width: 120px;
        height: 120px;
        font-size: 0.9375rem;
    }

    .rig-options div {
        flex: 1 1 45%;
    }

    #restaurant-name {
        font-size: 1.5rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .rig-options div {
        flex: 1 1 30%;
    }
}

/* Print styles */
@media print {
    .rig-options,
    button {
        display: none;
    }

    body {
        color: #000;
        background: #fff;
    }

    #restaurant-name,
    #restaurant-address {
        color: #000;
    }
}
