/**
 * Calculator Action Bar Styles
 * Clean, lightweight, responsive and independent of theme styles.
 */

.cab-toolbar-wrapper {
    padding: 1rem 0;
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .cab-toolbar-wrapper {
        padding: 1.5rem 0;
    }
}

.cab-toolbar-card {
    background-color: #ffffff;
    padding: 0.5rem;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-sizing: border-box;
    transition: box-shadow 0.25s ease;
}

.cab-toolbar-card:hover {
    box-shadow: 0 14px 20px -3px rgba(0, 0, 0, 0.1), 0 6px 8px -2px rgba(0, 0, 0, 0.05);
}

/* Grid Layout */
.cab-toolbar-grid {
    display: grid;
    gap: 0.25rem;
    align-items: stretch;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Responsive columns based on item count and screen width */
.cab-toolbar-grid.cols-6 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 480px) {
    .cab-toolbar-grid.cols-6 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (min-width: 768px) {
    .cab-toolbar-grid.cols-6 {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

.cab-toolbar-grid.cols-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 480px) {
    .cab-toolbar-grid.cols-5 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (min-width: 768px) {
    .cab-toolbar-grid.cols-5 {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.cab-toolbar-grid.cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 640px) {
    .cab-toolbar-grid.cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.cab-toolbar-grid.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cab-toolbar-grid.cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cab-toolbar-grid.cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

/* Items */
.cab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.5rem;
    border-radius: 0.5rem;
    text-decoration: none !important;
    color: inherit;
    transition: background-color 0.2s ease, transform 0.15s ease;
    border: none;
    background: transparent;
    cursor: pointer;
    box-sizing: border-box;
    min-height: 80px;
    margin: 0;
    line-height: 1.3;
}

/* Static price item is not hoverable if not linked */
.cab-item.cab-item-static {
    cursor: default;
}

.cab-item:not(.cab-item-static):hover {
    background-color: #f1f5f9;
}

.cab-item:not(.cab-item-static):active {
    transform: scale(0.97);
}

/* Icon Container */
.cab-icon-box {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.375rem;
    transition: transform 0.2s ease;
}

.cab-item:hover .cab-icon-box {
    transform: translateY(-1px);
}

.cab-icon-box svg {
    width: 1.5rem;
    height: 1.5rem;
    display: block;
}

/* Color variations */
.cab-icon-price {
    background-color: #d1fae5;
    color: #059669;
}

.cab-icon-guide {
    background-color: #e0f2fe;
    color: #0284c7;
}

.cab-icon-error {
    background-color: #ffe4e6;
    color: #e11d48;
}

.cab-icon-example {
    background-color: #fef3c7;
    color: #d97706;
}

.cab-icon-tour {
    background-color: #e0e7ff;
    color: #4f46e5;
}

.cab-icon-all {
    background-color: #f1f5f9;
    color: #475569;
}

/* Labels */
.cab-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
    transition: color 0.2s ease;
    display: block;
    word-break: break-word;
}

.cab-item:hover .cab-label-guide,
.cab-item:hover .cab-label-error,
.cab-item:hover .cab-label-example,
.cab-item:hover .cab-label-all {
    color: #0369a1;
}

.cab-item:hover .cab-label-tour {
    color: #4338ca;
}

/* Value (e.g. 200₽) */
.cab-value-price {
    font-size: 0.875rem;
    font-weight: 700;
    color: #059669;
    display: block;
    margin-top: 0.125rem;
}

/* Button Reset */
button.cab-item {
    font-family: inherit;
    font-size: inherit;
    width: 100%;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

button.cab-item:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}
