/* Professional Tire Tools Plugin - Styles v3.2.0 */

/* ===== ROOT VARIABLES ===== */
:root {
    --tt-primary: #E60012;        /* Primary Red */
    --tt-primary-dark: #B8000E;   /* Darker Red */
    --tt-secondary: #2C5234;      /* Secondary Green */
    --tt-success: #28a745;
    --tt-warning: #ffc107;
    --tt-danger: #dc3545;
    --tt-light: #f8f9fa;
    --tt-dark: #343a40;
    --tt-border: #e9ecef;
    --tt-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    --tt-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
    --tt-radius: 12px;
    --tt-radius-sm: 8px;
    --tt-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --tt-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* ===== MAIN CONTAINER ===== */
.tt-tabs-wrapper {
    margin: 2rem auto;
    max-width: 1200px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid var(--tt-border);
    border-radius: var(--tt-radius);
    box-shadow: var(--tt-shadow-lg);
    overflow: hidden;
    position: relative;
    font-family: var(--tt-font-family);
}

/* ===== LOADING STATE ===== */
.tt-tabs-wrapper.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(2px);
    z-index: 100;
}

.tt-tabs-wrapper.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid var(--tt-border);
    border-top: 3px solid var(--tt-primary);
    border-radius: 50%;
    animation: tt-spin 1s linear infinite;
    z-index: 101;
}

@keyframes tt-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== TAB NAVIGATION ===== */
.tt-tab-nav {
    display: flex;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid var(--tt-border);
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.tt-tab-nav::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    height: 2px;
    background: var(--tt-primary);
    transition: var(--tt-transition);
    z-index: 1;
}

.tt-tab-link {
    flex: 1;
    min-width: 120px;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--tt-dark);
    text-decoration: none;
    cursor: pointer;
    transition: var(--tt-transition);
    font-weight: 500;
    font-size: 0.9rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.tt-tab-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.tt-tab-link:hover::before {
    left: 100%;
}

.tt-tab-link:hover {
    background: rgba(230, 0, 18, 0.1);
    color: var(--tt-primary);
    transform: translateY(-2px);
}

.tt-tab-link.active {
    background: linear-gradient(135deg, var(--tt-primary) 0%, var(--tt-primary-dark) 100%);
    color: white;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tt-tab-link.active:hover {
    background: linear-gradient(135deg, var(--tt-primary-dark) 0%, var(--tt-primary) 100%);
    transform: none;
}

/* ===== TAB CONTENT ===== */
.tt-tab-content-wrapper {
    background: white;
}

.tt-tab-content {
    padding: 2.5rem;
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== CALCULATOR STYLES ===== */
.tt-calculator {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid var(--tt-border);
    border-radius: var(--tt-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--tt-shadow);
    transition: var(--tt-transition);
}

.tt-calculator:hover {
    box-shadow: var(--tt-shadow-lg);
    transform: translateY(-2px);
}

.tt-calculator h3 {
    color: var(--tt-primary);
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.tt-calculator h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--tt-primary), var(--tt-secondary));
    border-radius: 2px;
}

/* ===== TIRE INPUT GROUPS ===== */
.tt-tire-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tt-tire-input input {
    flex: 1;
    min-width: 80px;
    max-width: 120px;
    width: auto !important;
    text-align: center;
}

.tt-tire-input span {
    font-weight: bold;
    color: var(--tt-dark);
    font-size: 1.1rem;
}

/* ===== PRESSURE CALCULATOR SPECIFIC ===== */
.tt-pressure-form .tt-tire-input {
    justify-content: center;
    margin: 0.5rem 0;
}

.tt-pressure-form .tt-form-group input:not(.tt-tire-input input) {
    max-width: 200px;
    margin: 0 auto;
}

.tt-pressure-form .tt-tire-size-input {
    width: 100% !important;
    max-width: 300px !important;
    margin: 0 auto;
}

/* ===== FORM ELEMENTS ===== */
.tt-form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.tt-form-group label {
    display: block;
    font-weight: 600;
    color: var(--tt-dark);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    position: relative;
}

.tt-form-group label::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: var(--tt-primary);
    transition: width 0.3s ease;
}

.tt-form-group:focus-within label::after {
    width: 100%;
}

.tt-form-group input,
.tt-form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--tt-border);
    border-radius: var(--tt-radius-sm);
    font-size: 1rem;
    transition: var(--tt-transition);
    background: white;
    color: var(--tt-dark);
    box-sizing: border-box;
    max-width: 100%;
}

.tt-form-group input:focus,
.tt-form-group select:focus {
    outline: none;
    border-color: var(--tt-primary);
    box-shadow: 0 0 0 3px rgba(230, 0, 18, 0.1);
    transform: translateY(-1px);
}

.tt-form-group input:hover,
.tt-form-group select:hover {
    border-color: var(--tt-primary);
}

/* ===== ENHANCED BUTTON ANIMATIONS ===== */
.tt-calculate-btn,
.tt-btn {
    background: linear-gradient(135deg, var(--tt-primary) 0%, var(--tt-primary-dark) 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--tt-transition);
    display: block;
    margin: 2rem auto;
    min-width: 200px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--tt-shadow);
}

.tt-calculate-btn:hover,
.tt-btn:hover {
    background: linear-gradient(135deg, var(--tt-primary-dark) 0%, var(--tt-primary) 100%);
    box-shadow: var(--tt-shadow-lg);
    transform: translateY(-2px);
}

.tt-calculate-btn.loading,
.tt-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.tt-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: tt-spin 1s linear infinite;
    margin-right: 8px;
}

.tt-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: tt-ripple 0.6s linear;
    pointer-events: none;
}

@keyframes tt-ripple {
    to {
        transform: scale(1);
        opacity: 0;
    }
}

/* ===== ENHANCED FORM STYLES ===== */
.tt-form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.tt-form-group.focused label::after {
    width: 100%;
}

.tt-form-group.filled label {
    color: var(--tt-primary);
    transform: translateY(-2px);
}

.tt-form-group.error input,
.tt-form-group.error select {
    border-color: var(--tt-danger);
    animation: tt-shake 0.3s ease-in-out;
}

.tt-form-group.success input,
.tt-form-group.success select {
    border-color: var(--tt-success);
}

.tt-form-group.error input:focus,
.tt-form-group.error select:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.tt-form-group.success input:focus,
.tt-form-group.success select:focus {
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

@keyframes tt-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.tt-validation-message {
    color: var(--tt-danger);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    animation: slideInDown 0.3s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== ENHANCED TAB TRANSITIONS ===== */
.tt-tab-content-wrapper.transitioning {
    position: relative;
    overflow: hidden;
}

.tt-tab-content-wrapper.transitioning::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: slide-transition 0.6s ease-out;
    z-index: 1;
}

@keyframes slide-transition {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ===== TOOLTIP STYLES ===== */
.tt-tooltip {
    position: absolute;
    background: var(--tt-dark);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--tt-radius-sm);
    font-size: 0.875rem;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: var(--tt-shadow);
    pointer-events: none;
}

.tt-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--tt-dark);
}

/* ===== ENHANCED RESULT ANIMATIONS ===== */
.tt-results {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid var(--tt-border);
    border-radius: var(--tt-radius);
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: var(--tt-shadow);
    animation: slideInUp 0.5s ease-out;
}

.tt-results [data-animate-value] {
    font-weight: bold;
    color: var(--tt-primary);
}

/* ===== LOADING SKELETON ===== */
.tt-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: tt-skeleton-loading 1.5s infinite;
    border-radius: 4px;
    height: 20px;
    margin: 10px 0;
}

@keyframes tt-skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== FLOATING ACTION STYLES ===== */
.tt-floating-actions {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.tt-floating-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--tt-primary);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: var(--tt-shadow-lg);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--tt-transition);
}

.tt-floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(230, 0, 18, 0.4);
}

/* ===== ENHANCED RESPONSIVE ===== */
@media (max-width: 768px) {
    .tt-floating-actions {
        bottom: 10px;
        right: 10px;
    }
    
    .tt-floating-btn {
        width: 48px;
        height: 48px;
    }
    
    .tt-tooltip {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Secondary Button */
.tt-btn-secondary {
    background: linear-gradient(135deg, var(--tt-secondary) 0%, #1e3a24 100%);
}

.tt-btn-secondary:hover {
    box-shadow: 0 10px 25px rgba(44, 82, 52, 0.3);
}

/* Success Button */
.tt-btn-success {
    background: linear-gradient(135deg, var(--tt-success) 0%, #218838 100%);
}

.tt-btn-success:hover {
    box-shadow: 0 10px 25px rgba(40, 167, 69, 0.3);
}

/* ===== RESULTS STYLING ===== */
.tt-results {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid var(--tt-border);
    border-radius: var(--tt-radius);
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: var(--tt-shadow);
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tt-results h4 {
    color: var(--tt-primary);
    margin: 0 0 1.5rem 0;
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.tt-results h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background: var(--tt-primary);
    border-radius: 1px;
}

.tt-results ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tt-results li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--tt-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--tt-transition);
}

.tt-results li:last-child {
    border-bottom: none;
}

.tt-results li:hover {
    background: rgba(230, 0, 18, 0.05);
    padding-left: 1rem;
    padding-right: 1rem;
    margin: 0 -1rem;
    border-radius: var(--tt-radius-sm);
}

/* ===== GRID LAYOUTS ===== */
.tt-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.tt-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.tt-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ===== CARDS ===== */
.tt-card {
    background: white;
    border: 1px solid var(--tt-border);
    border-radius: var(--tt-radius);
    padding: 1.5rem;
    box-shadow: var(--tt-shadow);
    transition: var(--tt-transition);
}

.tt-card:hover {
    box-shadow: var(--tt-shadow-lg);
    transform: translateY(-2px);
}

.tt-card-header {
    border-bottom: 1px solid var(--tt-border);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.tt-card-title {
    color: var(--tt-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

/* ===== PROGRESS BARS ===== */
.tt-progress {
    background: var(--tt-border);
    border-radius: 50px;
    height: 8px;
    overflow: hidden;
    position: relative;
}

.tt-progress-bar {
    background: linear-gradient(90deg, var(--tt-success), var(--tt-warning), var(--tt-danger));
    height: 100%;
    border-radius: 50px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.tt-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ===== TOOLTIPS ===== */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--tt-dark);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--tt-radius-sm);
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--tt-transition);
    z-index: 1000;
}

[data-tooltip]::after {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--tt-dark);
    opacity: 0;
    visibility: hidden;
    transition: var(--tt-transition);
    z-index: 1000;
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ===== ALERTS ===== */
.tt-alert {
    padding: 1rem 1.5rem;
    border-radius: var(--tt-radius-sm);
    margin: 1rem 0;
    border-left: 4px solid;
    position: relative;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.tt-alert-success {
    background: rgba(40, 167, 69, 0.1);
    border-left-color: var(--tt-success);
    color: #155724;
}

.tt-alert-warning {
    background: rgba(255, 193, 7, 0.1);
    border-left-color: var(--tt-warning);
    color: #856404;
}

.tt-alert-danger {
    background: rgba(220, 53, 69, 0.1);
    border-left-color: var(--tt-danger);
    color: #721c24;
}

.tt-alert-info {
    background: rgba(0, 124, 186, 0.1);
    border-left-color: var(--tt-primary);
    color: #004085;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .tt-tabs-wrapper {
        max-width: 95%;
        margin: 1.5rem auto;
    }
    
    .tt-tab-content {
        padding: 2rem;
    }
    
    .tt-calculator {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .tt-tab-nav {
        flex-direction: column;
    }
    
    .tt-tab-link {
        min-width: unset;
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
    }
    
    .tt-tab-content {
        padding: 1.5rem;
    }
    
    .tt-calculator {
        padding: 1.25rem;
    }
    
    .tt-calculate-btn,
    .tt-btn {
        width: 100%;
        margin: 1.5rem 0;
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .tt-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .tt-comparison-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .tt-tire-input {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .tt-tabs-wrapper {
        margin: 1rem;
        border-radius: var(--tt-radius-sm);
    }
    
    .tt-tab-content {
        padding: 1rem;
    }
    
    .tt-calculator {
        padding: 1rem;
        border-radius: var(--tt-radius-sm);
    }
    
    .tt-form-group input,
    .tt-form-group select {
        padding: 0.75rem;
        font-size: 0.95rem;
    }
    
    .tt-calculator h3 {
        font-size: 1.25rem;
    }
    
    .tt-results h4 {
        font-size: 1.1rem;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus indicators */
.tt-tab-link:focus,
.tt-calculate-btn:focus,
.tt-btn:focus,
.tt-form-group input:focus,
.tt-form-group select:focus {
    outline: 2px solid var(--tt-primary);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --tt-border: #000;
        --tt-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }
}

/* ===== COST COMPARISON STYLES ===== */
.tt-comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.tt-tire-result-card {
    background: white;
    border: 2px solid var(--tt-border);
    border-radius: var(--tt-radius);
    padding: 1.5rem;
    position: relative;
    transition: var(--tt-transition);
    box-shadow: var(--tt-shadow);
}

.tt-tire-result-card:hover {
    box-shadow: var(--tt-shadow-lg);
    transform: translateY(-2px);
}

.tt-tire-result-card.tt-best-value {
    border-color: var(--tt-success);
    background: linear-gradient(135deg, #ffffff 0%, #f8fff8 100%);
}

.tt-badge-best {
    position: absolute;
    top: -10px;
    right: 1rem;
    background: var(--tt-success);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.tt-tire-result-card h5 {
    color: var(--tt-primary);
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
}

.tt-cost-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tt-cost-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--tt-border);
}

.tt-cost-item:last-child {
    border-bottom: none;
}

.tt-cost-item span {
    color: var(--tt-dark);
    font-size: 0.9rem;
}

.tt-cost-item strong {
    color: var(--tt-primary);
    font-weight: 600;
}

/* ===== PRINT STYLES ===== */
@media print {
    .tt-tab-nav,
    .tt-calculate-btn,
    .tt-btn {
        display: none !important;
    }
    
    .tt-tabs-wrapper,
    .tt-calculator,
    .tt-results {
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }
    
    .tt-tab-content {
        display: block !important;
        padding: 1rem !important;
    }
    
    * {
        color: #000 !important;
        background: white !important;
    }
}

/* ===== ENHANCED TIRE CHARTS STYLES ===== */
.tt-tire-charts-container {
    max-width: 100%;
    overflow: hidden;
}

.tt-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
    align-items: end;
    padding: 0 1.5rem;
    box-sizing: border-box;
}

.tt-form-row .tt-form-group {
    margin-bottom: 0;
    min-width: 0;
    width: 100%;
}

.tt-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--tt-border);
}

.tt-results-count {
    background: var(--tt-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.tt-tire-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    min-height: 200px;
}

.tt-tire-card {
    background: white;
    border: 2px solid var(--tt-border);
    border-radius: var(--tt-radius);
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tt-tire-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(230, 0, 18, 0.1), transparent);
    transition: left 0.6s ease;
}

.tt-tire-card:hover::before {
    left: 100%;
}

.tt-tire-card:hover {
    border-color: var(--tt-primary);
    box-shadow: 0 8px 25px rgba(230, 0, 18, 0.15);
    transform: translateY(-5px);
}

.tt-tire-size {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--tt-primary);
    text-align: center;
    margin-bottom: 1rem;
    margin-top: 2.5rem;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    background: rgba(230, 0, 18, 0.05);
    padding: 0.5rem;
    border-radius: var(--tt-radius-sm);
    border: 1px solid rgba(230, 0, 18, 0.1);
    position: relative;
    z-index: 1;
}

.tt-tire-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.tt-detail {
    text-align: center;
    padding: 0.75rem 0.5rem;
    background: rgba(108, 117, 125, 0.05);
    border-radius: var(--tt-radius-sm);
    border: 1px solid rgba(108, 117, 125, 0.1);
    transition: all 0.3s ease;
}

.tt-tire-card:hover .tt-detail {
    background: rgba(230, 0, 18, 0.05);
    border-color: rgba(230, 0, 18, 0.1);
}

.tt-label {
    display: block;
    font-size: 0.75rem;
    color: var(--tt-dark);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.25rem;
    letter-spacing: 0.5px;
}

.tt-value {
    display: block;
    font-size: 1rem;
    color: var(--tt-primary);
    font-weight: 700;
}

.tt-tire-category {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
}

.tt-category-passenger {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
    border: 1px solid rgba(0, 123, 255, 0.2);
}

.tt-category-performance {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.tt-category-suv {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.tt-category-ultra {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.tt-tire-passenger {
    border-left: 4px solid #007bff;
}

.tt-tire-performance {
    border-left: 4px solid #ffc107;
}

.tt-tire-suv {
    border-left: 4px solid #28a745;
}

.tt-tire-ultra {
    border-left: 4px solid #dc3545;
}

.tt-no-results {
    text-align: center;
    color: var(--tt-text-light);
    font-style: italic;
    grid-column: 1 / -1;
    padding: 3rem 2rem;
    background: rgba(108, 117, 125, 0.05);
    border: 2px dashed var(--tt-border);
    border-radius: var(--tt-radius);
    font-size: 1.1rem;
}

.tt-no-results::before {
    content: "🔍";
    display: block;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.tt-chart-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid var(--tt-border);
    border-radius: var(--tt-radius);
    padding: 2rem;
    margin-top: 2rem;
}

.tt-chart-info h5 {
    color: var(--tt-primary);
    margin: 0 0 1.5rem 0;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
}

.tt-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tt-info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.2rem;
    background: white;
    border-radius: var(--tt-radius-sm);
    border: 1px solid var(--tt-border);
    min-height: 70px;
    box-sizing: border-box;
    margin-bottom: 0.5rem;
}

.tt-info-item strong {
    color: var(--tt-primary);
    min-width: 100px;
    font-weight: 600;
    white-space: nowrap;
}

.tt-info-item span {
    color: var(--tt-dark);
    font-size: 0.9rem;
    flex: 1;
}

/* ===== RESPONSIVE TIRE CHARTS ===== */
@media (max-width: 768px) {
    .tt-form-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 0.5rem;
        margin-bottom: 2.5rem;
    }
    
    .tt-info-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
    
    .tt-results-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .tt-tire-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1rem;
    }
    
    .tt-tire-card {
        padding: 1rem;
    }
    
    .tt-tire-size {
        font-size: 1.2rem;
    }
    
    .tt-tire-details {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .tt-info-grid {
        grid-template-columns: 1fr;
    }
    
    .tt-chart-info {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .tt-form-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
        margin-bottom: 2.5rem;
    }
    
    .tt-tire-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .tt-info-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .tt-info-item {
        padding: 0.75rem;
        gap: 0.5rem;
        min-height: 50px;
    }
    
    .tt-tire-category {
        position: static;
        margin-top: 1.5rem;
        margin-bottom: 1rem;
        text-align: center;
        display: block;
        width: 100%;
    }
    
    .tt-tire-card {
        padding: 1rem;
    }
    
    .tt-tire-size {
        font-size: 1.1rem;
        padding: 0.4rem;
        margin-top: 0.5rem;
    }
    
    .tt-tire-details {
        gap: 0.5rem;
    }
    
    .tt-detail {
        padding: 0.5rem 0.3rem;
    }
    
    .tt-label {
        font-size: 0.7rem;
    }
    
    .tt-value {
        font-size: 0.9rem;
    }
    
    .tt-no-results {
        padding: 2rem 1rem;
        font-size: 1rem;
    }
    
    .tt-no-results::before {
        font-size: 2rem;
    }
}

/* ===== TIRE CHARTS ANIMATIONS ===== */
.tt-tire-card {
    animation: fadeInUp 0.5s ease-out;
}

.tt-tire-card:nth-child(1) { animation-delay: 0.1s; }
.tt-tire-card:nth-child(2) { animation-delay: 0.15s; }
.tt-tire-card:nth-child(3) { animation-delay: 0.2s; }
.tt-tire-card:nth-child(4) { animation-delay: 0.25s; }
.tt-tire-card:nth-child(5) { animation-delay: 0.3s; }
.tt-tire-card:nth-child(6) { animation-delay: 0.35s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== LOADING STATES ===== */
.tt-tire-grid.loading {
    position: relative;
    min-height: 200px;
}

.tt-tire-grid.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid var(--tt-border);
    border-top: 3px solid var(--tt-primary);
    border-radius: 50%;
    animation: tt-spin 1s linear infinite;
}

/* ===== SEARCH HIGHLIGHTING ===== */
.tt-tire-card.highlight {
    border-color: var(--tt-warning);
    background: rgba(255, 193, 7, 0.05);
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.1);
}

.tt-tire-size mark {
    background: var(--tt-warning);
    color: var(--tt-dark);
    padding: 0.1rem 0.2rem;
    border-radius: 2px;
}

/* ===== ENHANCED ACCESSIBILITY ===== */
.tt-tire-card:focus {
    outline: 3px solid var(--tt-primary);
    outline-offset: 2px;
}

.tt-tire-card[aria-selected="true"] {
    border-color: var(--tt-primary);
    background: rgba(230, 0, 18, 0.05);
    box-shadow: 0 0 0 3px rgba(230, 0, 18, 0.1);
}

/* ===== ENHANCED TOOLTIPS FOR TIRE CHARTS ===== */
.tt-tire-card[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--tt-dark);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: var(--tt-radius-sm);
    font-size: 0.875rem;
    white-space: pre-line;
    opacity: 0;
    visibility: hidden;
    transition: var(--tt-transition);
    z-index: 1000;
    max-width: 200px;
    text-align: center;
}

.tt-tire-card[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
}

/* ===== VERTICAL TAB LAYOUT ===== */
.tt-tabs-wrapper.tt-vertical-layout {
    display: flex;
    flex-direction: row;
    max-height: 800px;
}

.tt-tabs-wrapper.tt-vertical-layout .tt-tab-nav {
    flex-direction: column;
    min-width: 220px;
    max-width: 220px;
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: none;
    border-right: 2px solid var(--tt-border);
    overflow-y: auto;
    max-height: 800px;
}

.tt-tabs-wrapper.tt-vertical-layout .tt-tab-nav::after {
    display: none;
}

.tt-tabs-wrapper.tt-vertical-layout .tt-tab-link {
    flex: none;
    min-width: auto;
    width: 100%;
    text-align: left;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    margin: 0;
    position: relative;
}

.tt-tabs-wrapper.tt-vertical-layout .tt-tab-link::after {
    content: '';
    position: absolute;
    top: 0;
    right: -2px;
    width: 3px;
    height: 100%;
    background: var(--tt-primary);
    transform: scaleY(0);
    transition: var(--tt-transition);
    transform-origin: center;
}

.tt-tabs-wrapper.tt-vertical-layout .tt-tab-link.active::after {
    transform: scaleY(1);
}

.tt-tabs-wrapper.tt-vertical-layout .tt-tab-link:hover {
    background: rgba(230, 0, 18, 0.08);
    transform: translateX(4px);
    padding-left: 2rem;
}

.tt-tabs-wrapper.tt-vertical-layout .tt-tab-link.active {
    background: linear-gradient(90deg, var(--tt-primary) 0%, var(--tt-primary-dark) 100%);
    color: white;
    transform: translateX(4px);
    padding-left: 2rem;
}

.tt-tabs-wrapper.tt-vertical-layout .tt-tab-link.active:hover {
    transform: translateX(4px);
    padding-left: 2rem;
}

.tt-tabs-wrapper.tt-vertical-layout .tt-tab-content-wrapper {
    flex: 1;
    overflow-y: auto;
    max-height: 800px;
}

.tt-tabs-wrapper.tt-vertical-layout .tt-tab-content {
    padding: 2rem;
    min-height: calc(100vh - 200px);
}

/* Responsive adjustments for vertical layout */
@media (max-width: 768px) {
    .tt-tabs-wrapper.tt-vertical-layout {
        flex-direction: column;
        max-height: none;
    }
    
    .tt-tabs-wrapper.tt-vertical-layout .tt-tab-nav {
        flex-direction: row;
        min-width: auto;
        max-width: none;
        border-right: none;
        border-bottom: 2px solid var(--tt-border);
        overflow-x: auto;
        max-height: none;
        white-space: nowrap;
    }
    
    .tt-tabs-wrapper.tt-vertical-layout .tt-tab-link {
        display: inline-block;
        width: auto;
        min-width: 120px;
        text-align: center;
        border-bottom: none;
        border-right: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .tt-tabs-wrapper.tt-vertical-layout .tt-tab-link::after {
        top: auto;
        bottom: -2px;
        right: 0;
        width: 100%;
        height: 3px;
        transform: scaleX(0);
        transform-origin: center;
    }
    
    .tt-tabs-wrapper.tt-vertical-layout .tt-tab-link.active::after {
        transform: scaleX(1);
    }
    
    .tt-tabs-wrapper.tt-vertical-layout .tt-tab-link:hover,
    .tt-tabs-wrapper.tt-vertical-layout .tt-tab-link.active,
    .tt-tabs-wrapper.tt-vertical-layout .tt-tab-link.active:hover {
        transform: translateY(-2px);
        padding-left: 1.5rem;
    }
    
    .tt-tabs-wrapper.tt-vertical-layout .tt-tab-content-wrapper {
        max-height: none;
        overflow-y: visible;
    }
    
    .tt-tabs-wrapper.tt-vertical-layout .tt-tab-content {
        min-height: auto;
    }
}
