/* Google Material Icons styling */
.material-symbols-outlined {
    font-variation-settings:
    'FILL' 1,
    'wght' 400,
    'GRAD' 0,
    'opsz' 20;
    vertical-align: middle;
}

.status-icon-check-circle {
    color: #4CAF50;
    font-size: 16px;
}

/* Override status classes for Material Icons */
.status-yes .material-symbols-outlined {
    background: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    color: #4CAF50 !important;
    font-size: 16px !important;
}

/* Hide text content when Material Icons are used */
.status-yes:has(.material-symbols-outlined) {
    background: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    color: initial !important;
}

/* Case Studies Styles */
.case-studies-display {
    border-top: 2px solid #e0e0e0;
    padding-top: 20px;
}

.case-studies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.case-study-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.case-study-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: #ff7f00;
}

.case-study-image {
    margin-bottom: 12px;
}

.case-study-title {
    font-size: 16px;
    font-weight: bold;
    color: #2c3e50;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.case-study-description {
    font-size: 14px;
    color: #666;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.case-study-details {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.case-study-cost,
.case-study-time {
    font-size: 12px;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 6px;
    color: #495057;
}

.case-study-cost {
    background: #e8f5e8;
    color: #2d5a2d;
}

/* Search Results Styles */
.selected-vehicle-info {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.selected-vehicle-info h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 18px;
}

.vehicle-info-card {
    background: white;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    padding: 15px;
}

.vehicle-info-card h4 {
    margin: 0 0 8px 0;
    color: #ff7f00;
    font-size: 16px;
}

.vehicle-info-card p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.compatible-keys-section {
    margin-top: 30px;
}

.compatible-keys-section h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 18px;
    border-bottom: 2px solid #ff7f00;
    padding-bottom: 8px;
}

/* Table styles */
.keys-table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

.compatible-keys-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.compatible-keys-table th {
    background: #ff7f00;
    color: white;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.compatible-keys-table td {
    padding: 12px 8px;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: top;
}

.compatible-keys-table tr:hover {
    background: #f8f9fa;
}

/* Key image styles */
.key-image-cell {
    width: 120px;
    max-width: 120px;
    text-align: center;
    vertical-align: middle;
    padding: 8px 4px;
}

.key-image {
    max-width: 100px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.key-image:hover {
    transform: scale(1.1);
}

/* Key type image styles (for step 5) */
.key-type-image {
    max-width: 120px;
    max-height: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.key-type-image:hover {
    transform: scale(1.05);
}

/* Compatible keys table specific overrides */
.compatible-keys-table .vehicles-data-table thead th:nth-child(1) {
    width: 120px !important;
    max-width: 120px !important;
    text-align: center !important;
}

.compatible-keys-table .vehicles-data-table tbody td:nth-child(1) {
    width: 120px !important;
    max-width: 120px !important;
    text-align: center !important;
    vertical-align: middle !important;
    padding: 8px 4px !important;
}

.key-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.key-thumbnail {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #ddd;
    flex-shrink: 0;
}

.key-details {
    min-width: 0;
    flex: 1;
}

.key-details strong {
    color: #2c3e50;
    font-size: 13px;
    display: block;
    line-height: 1.3;
}

.key-details small {
    color: #666;
    font-size: 11px;
    display: block;
    line-height: 1.2;
    margin-top: 2px;
}

/* Status indicators */
.status-yes {
    background: #4CAF50;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
}

.status-no {
    background: #f44336;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
}

.status-conditional {
    background: #ff9800;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
}

.status-unknown {
    background: #9e9e9e;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
}

.purchase-link {
    background: #ff7f00;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 11px;
    display: inline-block;
    transition: background 0.3s ease;
    font-weight: 500;
}

.purchase-link:hover {
    background: #e6720a;
    text-decoration: none;
    color: white;
}

/* Mobile card layout */
.keys-mobile-cards {
    display: none;
}

.key-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.key-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.key-card-title h4 {
    margin: 0 0 4px 0;
    color: #2c3e50;
    font-size: 16px;
}

.key-card-title p {
    margin: 0;
    color: #666;
    font-size: 12px;
}

.key-card-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.key-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.detail-value {
    font-size: 13px;
}

.no-results-message {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.no-results-message h3 {
    margin: 0 0 12px 0;
    color: #666;
    font-size: 18px;
}

.no-results-message p {
    margin: 8px 0;
    color: #666;
    line-height: 1.5;
}

/* Responsive design */
@media (max-width: 768px) {
    .keys-table-container {
        display: none;
    }
    
    .keys-mobile-cards {
        display: block;
    }
    
    /* Hide vehicles table and show mobile cards only in Step 5 */
    .vehicles-table {
        display: none !important;
    }
    
    .vehicles-data-table {
        display: none !important;
    }
    
    .vehicles-mobile-cards {
        display: block !important;
    }
    
    .key-detail {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

.case-study-time {
    background: #fff3e0;
    color: #ff7f00;
}

/* Case Study Modal */
.case-study-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.case-study-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.case-study-modal-content {
    background: white;
    padding: 20px;
    border-radius: 12px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    margin: 20px;
    width: 100%;
}

.case-study-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.case-study-modal-close:hover {
    color: #000;
}

.case-study-modal-title {
    font-size: 20px;
    font-weight: bold;
    color: #2c3e50;
    margin: 0 30px 15px 0;
}

.case-study-modal-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.case-study-modal-images img {
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
    object-fit: contain;
    max-height: 200px;
}

.case-study-modal-description {
    font-size: 15px;
    line-height: 1.6;
    color: #444;
    margin: 15px 0;
    white-space: pre-line;
}

.case-study-modal-details {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.case-study-modal-detail {
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: #495057;
}

@media (max-width: 768px) {
    .case-studies-grid {
        grid-template-columns: 1fr;
    }
    
    .case-study-modal-content {
        margin: 10px;
        padding: 15px;
    }
}

/* Memo field styling */
.memo-cell {
    max-width: 200px;
}

.memo-text {
    color: #6c757d;
    font-size: 13px;
    line-height: 1.4;
    cursor: help;
}

.service-item .memo-text {
    font-size: 12px;
    color: #495057;
}

/* Key Categories Styles */
.key-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.key-category-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.key-category-card:hover {
    border-color: #ff7f00;
    box-shadow: 0 4px 12px rgba(255, 127, 0, 0.15);
    transform: translateY(-2px);
}

.key-category-card h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.1em;
    font-weight: 600;
}

.key-category-card p {
    margin: 0;
    color: #666;
    font-size: 0.9em;
}

/* No data message */
.no-data-message {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

/* Error message */
.error-message {
    text-align: center;
    padding: 40px 20px;
    color: #d32f2f;
    background: #ffebee;
    border-radius: 8px;
    border: 1px solid #ffcdd2;
}

/* Main Search Selection Styles */
.main-search-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.search-option {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-option:hover {
    border-color: #ff7f00;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(25, 118, 210, 0.2);
}

.search-option .option-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.search-option h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.2em;
    font-weight: 600;
}

.search-option p {
    margin: 0;
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
}

/* Model Search Form Styles */
.model-search-form {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Vehicle Model Search Styles */
.vehicle-model-search-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.input-group .form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 10px;
    transition: border-color 0.3s ease;
}

.input-group .form-control:focus {
    outline: none;
    border-color: #ff7f00;
}

.input-group .btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.input-group .btn-primary {
    background: #ff7f00;
    color: white;
}

.input-group .btn-primary:hover {
    background: #e6720a;
    transform: translateY(-1px);
}

.search-tips {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.search-tips h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

.search-tips ul {
    margin: 0;
    padding-left: 20px;
}

.search-tips li {
    margin-bottom: 5px;
    color: #666;
    font-size: 14px;
}

.vehicle-model-search-results {
    margin-top: 20px;
}

.vehicle-model-search-results h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

.vehicles-table {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.vehicles-table h3 {
    margin: 0;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
}

.vehicles-data-table {
    width: 100% !important;
    border-collapse: collapse !important;
    background: white;
    table-layout: fixed !important;
    display: table !important;
}

.vehicles-data-table thead {
    display: table-header-group !important;
}

.vehicles-data-table tbody {
    display: table-row-group !important;
}

.vehicles-data-table thead tr,
.vehicles-data-table tbody tr {
    display: table-row !important;
}

.vehicles-data-table thead th,
.vehicles-data-table tbody td {
    display: table-cell !important;
}

.vehicles-data-table thead th {
    background: #ff9800;
    color: white;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    border: none;
}

.vehicles-data-table thead th:nth-child(1) {
    width: 40%;
    text-align: left;
}

.vehicles-data-table thead th:nth-child(2) {
    width: 30%;
    text-align: center;
}

.vehicles-data-table thead th:nth-child(3) {
    width: 30%;
    text-align: center;
}

.vehicles-data-table tbody td {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    vertical-align: middle;
    font-size: 14px;
    word-wrap: break-word;
    overflow: visible;
}

.vehicles-data-table tbody td:last-child {
    border-right: none;
}

.vehicles-data-table tbody td:nth-child(1) {
    text-align: left;
    font-weight: 600;
}

.vehicles-data-table tbody td:nth-child(2) {
    text-align: center;
    color: #666;
}

.vehicles-data-table tbody td:nth-child(3) {
    text-align: center;
    color: #666;
}

.vehicles-data-table tbody tr:hover {
    background: #f8f9fa;
    cursor: pointer;
}

.vehicles-data-table tbody tr:last-child td {
    border-bottom: none;
}

.vehicle-row {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.vehicle-row:hover {
    border-color: #ff7f00;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.1);
}

.vehicle-info h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.vehicle-details {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.vehicle-details span {
    font-size: 14px;
    color: #666;
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 4px;
}

.vehicle-actions .btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.vehicle-actions .btn-primary {
    background: #ff7f00;
    color: white;
}

.vehicle-actions .btn-primary:hover {
    background: #e6720a;
    transform: translateY(-1px);
}

.no-results-message {
    text-align: center;
    padding: 40px 20px;
    background: #f5f5f5;
    border-radius: 8px;
    margin-top: 20px;
}

.no-results-message h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
}

.no-results-message p {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 16px;
}

.search-suggestions {
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

.search-suggestions h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

.search-suggestions ul {
    margin: 0;
    padding-left: 20px;
}

.search-suggestions li {
    margin-bottom: 5px;
    color: #666;
    font-size: 14px;
}

/* Responsive design for vehicle model search */
@media (max-width: 768px) {
    .vehicle-row {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .vehicle-details {
        justify-content: flex-start;
    }
    
    .vehicle-actions {
        align-self: stretch;
    }
    
    .vehicle-actions .btn {
        width: 100%;
    }
}

/* Section header with button */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.section-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.view-in-step5-btn {
    background: #ff7f00;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.view-in-step5-btn:hover {
    background: #e6720a;
}

@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .view-in-step5-btn {
        width: 100%;
        padding: 12px;
    }
}

/* No image text styling */
.no-image-text {
    display: inline-block;
    padding: 8px;
    background-color: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
    width: 100px;
    height: 100px;
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile-specific styling for Step 1 container - Remove outer frame */
@media (max-width: 768px) {
    .search-step {
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        background: transparent !important;
        padding: 15px 0 !important;
        margin: 0 !important;
    }
    
    .search-form .container {
        padding: 15px !important;
    }
}
