/* Regional Toolbar - Horizontal Responsive Design */

.regional-tool-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 1rem;
    margin: 2rem 0;
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow-x: auto;
    min-height: 80px;
}

.tool-button {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    height: 80px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(5px);
    flex-shrink: 0;
}

.tool-button:hover {
    transform: scale(1.1) translateY(-4px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow:
        0 12px 24px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(255, 255, 255, 0.1);
}

.tool-button .icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.tool-button:hover .icon {
    transform: scale(1.2);
    filter: brightness(1.2) drop-shadow(0 0 8px currentColor);
}

.tool-button .label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.tool-button:hover .label {
    color: var(--text-primary);
    font-weight: 600;
}

/* Tooltip functionality */
.tool-button::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: var(--darker-bg);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.tool-button::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-2px);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid var(--darker-bg);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.tool-button:hover::before,
.tool-button:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Active state */
.tool-button.active {
    background: rgba(220, 38, 38, 0.2);
    border-color: var(--fire-red);
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.3);
}

.tool-button.active .icon {
    color: var(--fire-red) !important;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .regional-tool-bar {
        gap: 0.75rem;
        padding: 1rem 0.75rem;
        margin: 1.5rem 0;
        justify-content: flex-start;
        overflow-x: auto;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .regional-tool-bar::-webkit-scrollbar {
        display: none;
    }

    .tool-button {
        min-width: 70px;
        height: 70px;
        padding: 0.75rem;
    }

    .tool-button .icon {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }

    .tool-button .label {
        font-size: 0.7rem;
    }

    /* Adjust tooltip for mobile */
    .tool-button::before {
        bottom: 120%;
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
    }
}

@media (max-width: 480px) {
    .regional-tool-bar {
        gap: 0.5rem;
        padding: 0.75rem 0.5rem;
        margin: 1rem 0;
    }

    .tool-button {
        min-width: 60px;
        height: 60px;
        padding: 0.5rem;
    }

    .tool-button .icon {
        font-size: 1.1rem;
        margin-bottom: 0.2rem;
    }

    .tool-button .label {
        font-size: 0.65rem;
    }

    .tool-button:hover {
        transform: scale(1.05) translateY(-2px);
    }
}

/* Animation for initial load */
.tool-button {
    animation: toolbarSlideIn 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

.tool-button:nth-child(1) {
    animation-delay: 0.1s;
}

.tool-button:nth-child(2) {
    animation-delay: 0.2s;
}

.tool-button:nth-child(3) {
    animation-delay: 0.3s;
}

.tool-button:nth-child(4) {
    animation-delay: 0.4s;
}

.tool-button:nth-child(5) {
    animation-delay: 0.5s;
}

@keyframes toolbarSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus states for accessibility */
.tool-button:focus {
    outline: 2px solid var(--fire-red);
    outline-offset: 2px;
}

.tool-button:focus-visible {
    outline: 2px solid var(--fire-red);
    outline-offset: 2px;
}