/* VIN History Page Styles */

.history-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Header Section */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.history-header-content {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.history-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.history-subtitle {
    font-size: 1rem;
    color: #6b7280;
    margin: 0.25rem 0 0 0;
}

.history-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.history-check-vin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    min-height: 44px;
    background: #003d7a;
    border: 2px solid #003d7a;
    border-radius: 10px;
    color: #fff;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.history-check-vin-btn:hover {
    background: #3b72e8;
    border-color: #3b72e8;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(76, 132, 255, 0.3);
}

.history-check-vin-btn:active {
    transform: translateY(0);
}

.history-clear-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    min-height: 44px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    color: #dc2626;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.history-clear-btn:hover {
    background: #fef2f2;
    border-color: #dc2626;
    transform: translateY(-1px);
}

.history-clear-btn:active {
    transform: translateY(0);
}

/* Stats Section */
.history-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.history-stat-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.history-stat-card:hover {
    border-color: #003d7a;
    box-shadow: 0 4px 12px rgba(0, 61, 122, 0.1);
    transform: translateY(-2px);
}

.stat-content {
    flex: 1;
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #003d7a;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9375rem;
    color: #6b7280;
    font-weight: 600;
}

/* Filter Section */
.history-filter-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.history-search-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    min-height: 48px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.history-search-box:focus-within {
    border-color: #003d7a;
    box-shadow: 0 0 0 3px rgba(0, 61, 122, 0.1);
}

.history-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    color: #1a1a1a;
    min-height: 24px;
}

.history-search-input::placeholder {
    color: #9ca3af;
}

@media (max-width: 480px) {
    .history-search-box {
        padding: 1rem;
        min-height: 52px;
    }
    
    .history-search-input {
        font-size: 1rem;
    }
}

.history-filter-options {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.25rem;
    min-height: 44px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    color: #6b7280;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: #003d7a;
    color: #003d7a;
}

.filter-btn:active {
    transform: scale(0.98);
}

.filter-btn.active {
    background: #003d7a;
    border-color: #003d7a;
    color: #fff;
}

@media (max-width: 480px) {
    .filter-btn {
        flex: 1;
        min-width: 0;
        padding: 0.875rem 1rem;
        min-height: 48px;
        font-size: 0.875rem;
    }
    
    .history-filter-options {
        width: 100%;
    }
}

/* History List */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.history-item {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.history-item:hover {
    border-color: #4c84ff;
    box-shadow: 0 4px 12px rgba(76, 132, 255, 0.1);
    transform: translateY(-2px);
}

.history-item-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.history-item-main {
    flex: 1;
    min-width: 0;
}

.history-item-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-item-vin {
    font-size: 0.875rem;
    color: #6b7280;
    font-family: 'Courier New', monospace;
    margin: 0 0 0.25rem 0;
}

.history-item-body-class {
    font-size: 0.875rem;
    color: #9ca3af;
    margin: 0;
}

.history-item-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.history-item-time {
    font-size: 0.875rem;
    color: #9ca3af;
    white-space: nowrap;
}

.history-item-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.history-item-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn {
    background: #003d7a;
    border-color: #003d7a;
    color: #fff;
}

.view-btn:hover {
    background: #0056b3;
    border-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 61, 122, 0.3);
}

.delete-btn {
    background: #fff;
    color: #dc2626;
}

.delete-btn:hover {
    background: #fef2f2;
    border-color: #dc2626;
    transform: translateY(-1px);
}

/* Empty States */
.history-empty-state,
.history-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.empty-state-title,
.no-results-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 0.5rem 0;
}

.empty-state-description,
.no-results-description {
    font-size: 1rem;
    color: #6b7280;
    max-width: 500px;
    margin: 0 0 2rem 0;
}

.empty-state-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    min-height: 48px;
    background: #4c84ff;
    color: #fff;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.empty-state-btn:hover {
    background: #3b72e8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 132, 255, 0.3);
    color: #fff;
}

.empty-state-btn:active {
    transform: translateY(0);
}

@media (max-width: 480px) {
    .empty-state-btn {
        width: 100%;
        max-width: 320px;
        min-height: 52px;
        padding: 1rem 1.5rem;
    }
}

/* Promotional Card */
.history-promo-card {
    background: linear-gradient(135deg, #003d7a 0%, #0056b3 50%, #0066cc 100%);
    border-radius: 16px;
    padding: 2rem;
    color: #fff;
    margin-top: 2rem;
}

.promo-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.promo-text {
    flex: 1;
    text-align: center;
}

.promo-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

.promo-description {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .history-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    
    .history-header-content {
        width: 100%;
    }
    
    .history-title {
        font-size: 1.5rem;
    }
    
    .history-actions {
        width: 100%;
    }
    
    .history-check-vin-btn,
    .history-clear-btn {
        flex: 1;
        justify-content: center;
        min-height: 48px;
        font-size: 0.9375rem;
    }
    
    .history-stats {
        grid-template-columns: 1fr;
    }
    
    .history-item-header {
        flex-direction: column;
    }
    
    .history-item-meta {
        align-items: flex-start;
        width: 100%;
    }
    
    .history-item-actions {
        width: 100%;
    }
    
    .history-item-btn {
        flex: 1;
        justify-content: center;
        min-height: 44px;
    }
    
    .promo-content {
        flex-direction: column;
    }
    
    .promo-text {
        text-align: center;
    }
    
    .history-filter-options {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .history-container {
        padding: 1rem 0.5rem;
    }
    
    .history-title {
        font-size: 1.25rem;
    }
    
    .history-subtitle {
        font-size: 0.875rem;
    }
    
    .history-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .history-check-vin-btn,
    .history-clear-btn {
        width: 100%;
        min-height: 52px;
        font-size: 1rem;
        padding: 0.875rem 1rem;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .history-item {
        padding: 1rem;
    }
    
    .history-item-title {
        font-size: 1rem;
    }
    
    .history-item-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .history-item-btn {
        width: 100%;
        min-height: 48px;
        padding: 0.75rem 1rem;
    }
}
