/* Lookup Form Styles */
.pgv-lookup-container {
    display: flex;
    flex-direction: column;
    text-align: center;
    margin: 20px auto;
    padding: 25px;
    background-color: #222;
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.pgv-lookup-mini-container {
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
    padding: 20px;
}
.pgv-lookup-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.pgv-lookup-fields {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.pgv-lookup-field {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    min-width: 150px;
}
.pgv-lookup-field label {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}
.pgv-lookup-field select,
.pgv-lookup-field input[type="text"] {
    padding: 10px 12px;
    background-color: #333;
    color: #fff;
    border: 1px solid #555;
    border-radius: 5px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    min-width: 150px;
}
.pgv-lookup-field select {
    cursor: pointer;
}
.pgv-lookup-field select:hover,
.pgv-lookup-field input[type="text"]:hover {
    border-color: #777;
    background-color: #3a3a3a;
}
.pgv-lookup-field select:focus,
.pgv-lookup-field input[type="text"]:focus {
    outline: none;
    border-color: #ED1C24;
    box-shadow: 0 0 0 3px rgba(237, 28, 36, 0.25);
}
.pgv-lookup-field select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Custom Model Input */
.pgv-custom-model-input {
    margin-top: 10px;
    padding: 15px;
    background-color: rgba(237, 28, 36, 0.1);
    border: 1px solid rgba(237, 28, 36, 0.3);
    border-radius: 5px;
}
.pgv-custom-model-input label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #ED1C24;
}
.pgv-custom-model-field {
    width: 100%;
    padding: 10px 12px;
    background-color: #fff;
    color: #333;
    border: 2px solid #ED1C24;
    border-radius: 5px;
    font-size: 0.95rem;
    box-sizing: border-box;
}
.pgv-custom-model-field:focus {
    outline: none;
    border-color: #9B1B1F;
    box-shadow: 0 0 0 3px rgba(237, 28, 36, 0.25);
}
.pgv-custom-model-field::placeholder {
    color: #999;
    font-style: italic;
}

/* Add to Garage button */
#pgv-add-vehicle {
    padding: 12px 24px;
    background-color: #ED1C24;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(237, 28, 36, 0.3);
}
#pgv-add-vehicle:hover {
    background-color: #9B1B1F;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(237, 28, 36, 0.4);
}
#pgv-add-vehicle:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(237, 28, 36, 0.3);
}
#pgv-add-vehicle:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading indicators */
.filter-loading {
    display: none;
    margin-left: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ED1C24;
    font-style: italic;
}

.filter-group {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Center not-logged-in message and login button in the dropdown */
.pgv-not-logged-in-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    text-align: center;
}

.pgv-login-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    text-decoration: none;
}

.pgv-login-btn:hover {
}

/* Garage Management Styles */
.pgv-garage-list {
    margin: 20px auto;
    max-width: 600px;
    background-color: #f1f1f1;
    border-radius: 5px;
    padding: 10px;
    color: #333;
}
.pgv-garage-list h3 {
    margin-top: 0;
    text-align: center;
}
.pgv-vehicle-item {
    padding: 10px;
    border-bottom: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.pgv-vehicle-item:last-child {
    border-bottom: none;
}
.pgv-vehicle-item.active-vehicle {
    background-color: #d1e7dd;
}
.pgv-vehicle-item .vehicle-info {
    flex-grow: 1;
}
.pgv-vehicle-item button {
    background: none;
    border: none;
    padding: 5px 10px;
    font-size: 0.9rem;
    cursor: pointer;
    color: #ED1C24;
    transition: all 0.2s ease;
    border-radius: 3px;
}
.pgv-vehicle-item button:hover {
    text-decoration: underline;
    background: rgba(237, 28, 36, 0.1);
}
.pgv-vehicle-item .active-icon {
    font-size: 1.2rem;
    color: #198754;
    margin-right: 10px;
}

/* Header Garage Dropdown Layout */
#pgv-header-garage-wrapper {
    position: relative;
    display: inline-block;
}
.pgv-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: #fff;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.pgv-toggle-btn:hover {
    transform: scale(1.1);
    opacity: 0.8;
}
#pgv-header-garage-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    width: 550px;
    min-width: 450px;
    background: #fff;
    color: #333;
    z-index: 9999;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: 10px;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    overflow: visible;
}
#pgv-header-garage-dropdown.hidden {
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    visibility: hidden;
}
.hidden {
    display: none;
}

/* Header Garage Specific Layout */
.pgv-garage-header-layout {
    display: flex;
    flex-direction: column;
    background: #fff;
    color: #333;
}

/* Shopping For Section - at top */
.pgv-garage-summary-column {
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 10px;
}
.pgv-garage-summary-column h4 {
    margin: 0 0 8px 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.pgv-garage-summary-column .active-vehicle-summary {
    font-size: 1.15rem;
    line-height: 1.4;
    color: #222;
    font-weight: 600;
}
.pgv-garage-summary-column .active-vehicle-summary strong {
    color: #ED1C24;
}

/* Vehicle List Section - below */
.pgv-garage-list-column {
    padding: 15px;
    max-height: 450px;
    overflow-y: auto;
}
.pgv-garage-list-column::-webkit-scrollbar {
    width: 8px;
}
.pgv-garage-list-column::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}
.pgv-garage-list-column::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}
.pgv-garage-list-column::-webkit-scrollbar-thumb:hover {
    background: #555;
}
.pgv-garage-list-column h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #222;
}
.garage-vehicle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 5px;
    border: 1px solid #eee;
    background: #fafafa;
    transition: all 0.2s ease;
}
.garage-vehicle-row:hover {
    background: #f0f0f0;
    border-color: #ddd;
}
.garage-vehicle-row.active {
    background-color: #d1e7dd !important;
    border-color: #badbcc !important;
}
.garage-vehicle-row.active:hover {
    background-color: #c3e1d3 !important;
}
.garage-vehicle-name {
    font-size: 0.95rem;
    font-weight: 500;
    word-break: break-word;
    flex: 1;
}
.garage-vehicle-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}
.garage-vehicle-row .pgv-set-active-vehicle {
    padding: 6px 14px;
    font-size: 0.85rem;
    background: #9B1B1F;
    color: #fff;
    border: 1px solid #9B1B1F;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-weight: 500;
}
.garage-vehicle-row .pgv-set-active-vehicle:hover {
    background: #ED1C24;
    border-color: #ED1C24;
    color: #fff;
}
.garage-vehicle-row .pgv-remove-vehicle {
    padding: 6px 10px;
    font-size: 0.85rem;
    background: none;
    border: 1px solid #6c757d;
    color: #6c757d;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}
.garage-vehicle-row .pgv-remove-vehicle:hover {
    background: #6c757d;
    color: #fff;
}
.garage-vehicle-row .active-label {
    color: #198754;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-block;
}
.garage-vehicle-row .active-label::before {
    content: "";
    display: inline-block;
    margin-right: 3px;
}
.active-icon {
    color: #198754;
    font-size: 1.1rem;
    margin-left: 5px;
}

/* Inline confirmation styling */
.confirm-delete {
    font-size: 0.8rem;
    color: #d9534f;
    margin-top: 8px;
}

.confirm-delete button {
    margin: 0 4px;
    padding: 4px 10px !important;
    font-size: 0.8rem !important;
}

.confirm-yes {
    background: #d9534f !important;
    color: #fff !important;
    border-color: #d9534f !important;
}

.confirm-no {
    background: #6c757d !important;
    color: #fff !important;
    border-color: #6c757d !important;
}

/* Close button styling */
.pgv-close-btn,
#pgv-header-garage-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #6c757d;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.pgv-close-btn:hover,
#pgv-header-garage-close:hover {
    background: #e9ecef;
    color: #495057;
    transform: rotate(90deg);
}

/* My Garage Full Page Styles */
.pgv-my-garage-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
.pgv-my-garage-container {
    margin-top: 20px;
}
.pgv-my-garage-two-column {
    margin-bottom: 20px;
}
.pgv-my-garage-two-column .pgv-garage-header-layout {
    display: flex;
    gap: 20px;
}
.pgv-my-garage-two-column .pgv-garage-list-column,
.pgv-my-garage-two-column .pgv-garage-summary-column {
    flex: 1;
}
.add-vehicle-btn {
    margin-top: 15px;
    padding: 12px 24px;
    background-color: #ED1C24;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(237, 28, 36, 0.3);
}
.add-vehicle-btn:hover {
    background-color: #9B1B1F;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(237, 28, 36, 0.4);
}
.add-vehicle-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(237, 28, 36, 0.3);
}
.add-vehicle-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
#pgv-my-garage-lookup-form-container {
    margin-top: 20px;
    padding: 20px;
    background-color: #222;
    color: #fff;
    border-radius: 5px;
}
.hidden {
    display: none;
}

.pgv-active-vehicle {
    background: #f8f8f8;
    border: 1px solid #ccc;
    padding: 10px;
    margin: 15px 0;
    text-align: center;
    font-size: 1rem;
}
.pgv-active-vehicle strong {
    margin-right: 5px;
}

/* Active Vehicle Display in Product Page */
.pgv-active-vehicle-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: #f8f8f8;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin: 15px 0;
}
.pgv-active-vehicle-wrapper .pgv-active-vehicle {
    font-size: 1rem;
}
.pgv-change-active-btn {
    background: none !important;
    border: 1px solid #ED1C24 !important;
    color: #ED1C24 !important;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
}
.pgv-change-active-btn:hover {
    background: #ED1C24 !important;
    color: #fff !important;
}

/* Modal Styles */
.pgv-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}
.pgv-modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 25px;
    border: 1px solid #ddd;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    position: relative;
}
.pgv-modal-content h3 {
    margin: 0 0 20px 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: #262120;
    padding-bottom: 10px;
    border-bottom: 2px solid #ED1C24;
}
.pgv-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #6c757d;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}
.pgv-modal-close:hover,
.pgv-modal-close:focus {
    background: #e9ecef;
    color: #495057;
    transform: rotate(90deg);
}
.pgv-modal-vehicle-list {
    margin-top: 15px;
}
.pgv-modal-vehicle-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    border: 1px solid #eee;
    border-radius: 5px;
    background: #fafafa;
    transition: all 0.2s ease;
}
.pgv-modal-vehicle-item:hover {
    background: #f0f0f0;
    border-color: #ddd;
}
.pgv-modal-vehicle-item-active {
    background-color: #d1e7dd !important;
    border-color: #badbcc !important;
}
.pgv-modal-vehicle-item-active:hover {
    background-color: #c3e1d3 !important;
}
.pgv-modal-vehicle-item span:first-child {
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
}
.pgv-modal-select-vehicle {
    padding: 6px 14px;
    font-size: 0.85rem;
    background: none;
    border: 1px solid #ED1C24;
    color: #ED1C24;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-weight: 500;
}
.pgv-modal-select-vehicle:hover {
    background: #ED1C24;
    color: #fff;
}
.pgv-modal-active-label {
    color: #198754;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-block;
}
.pgv-modal-active-label::before {
    content: "✓ ";
    font-size: 1.1rem;
    font-weight: bold;
    display: inline-block;
    margin-right: 3px;
}

/* Product Compatibility Message */
.pgv-product-compatibility {
    background: #f8f8f8;
    border: 1px solid #ccc;
    padding: 10px;
    margin: 10px 0;
    text-align: center;
    font-size: 0.9rem;
    border-radius: 4px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pgv-product-compatibility.pgv-compatible {
    background: #d1e7dd;
    border-color: #badbcc;
    color: #0f5132;
}

.pgv-product-compatibility.pgv-not-compatible {
    background: #f8d7da;
    border-color: #f5c2c7;
    color: #842029;
}

.pgv-info-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    background: transparent;
    color: inherit; /* Match parent text color */
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 12px;
    margin-left: 5px;
    cursor: pointer;
}

.pgv-fitment-tooltip {
    visibility: hidden;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    max-width: 300px;
    white-space: normal;
    text-align: left;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
}

.pgv-product-compatibility:hover .pgv-fitment-tooltip,
.pgv-info-icon:hover + .pgv-fitment-tooltip {
    visibility: visible;
    opacity: 1;
}

/* Responsive adjustments */
@media screen and (min-width: 1200px) {
    .pgv-garage-list-column {
        max-height: 550px;
    }
}

@media screen and (max-width: 768px) {
    .pgv-lookup-fields {
        flex-wrap: wrap;
    }

    #pgv-header-garage-dropdown {
        width: calc(100vw - 30px);
        min-width: unset;
        max-width: 500px;
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        margin-top: 5px;
        padding: 15px;
        overflow: visible;
    }

    .pgv-garage-list-column {
        max-height: 280px;
    }

    .garage-vehicle-actions {
        flex-wrap: wrap;
        gap: 4px;
    }

    .garage-vehicle-row .pgv-set-active-vehicle,
    .garage-vehicle-row .pgv-remove-vehicle {
        font-size: 0.8rem;
        padding: 5px 10px;
    }
}

@media screen and (max-width: 600px) {
    #pgv-header-garage-dropdown {
        position: fixed;
        width: 100%;
        max-width: none;
        min-width: unset;
        padding: 15px;
        top: 60px;
        right: 0;
        left: 0;
        bottom: auto;
        transform: none;
        margin-top: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        z-index: 999999;
    }

    .pgv-garage-summary-column {
        padding: 12px;
    }

    .pgv-garage-list-column {
        padding: 12px;
        max-height: none;
        overflow-y: visible;
    }

    .garage-vehicle-row {
        padding: 12px;
    }

    .garage-vehicle-name {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    .garage-vehicle-actions {
        width: 100%;
        justify-content: flex-start;
        gap: 8px;
    }

    .garage-vehicle-row .pgv-set-active-vehicle {
        flex: 1;
        padding: 8px 12px;
    }

    .garage-vehicle-row .pgv-remove-vehicle {
        padding: 8px 12px;
    }

    .pgv-fitment-tooltip {
        max-width: 90%;
        left: 5%;
        transform: none;
    }

    .pgv-lookup-fields {
        flex-direction: column;
        gap: 0.5rem;
    }

    .pgv-lookup-field {
        width: 100%;
    }

    .pgv-lookup-field select {
        width: 100%;
    }
}

@media screen and (max-width: 480px) {
    .pgv-toggle-btn {
        font-size: 1.3rem;
    }

    #pgv-header-garage-dropdown {
        padding: 10px;
        right: 5px;
    }

    .garage-vehicle-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .pgv-vehicle-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}