/* 
 * Image Map Modal Styles
 * Shared across all themes
 */

/* Master Image Container */
.master-image-container {
    position: relative;
    max-width: 100%;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.master-image-container img {
    width: 100%;
    height: auto;
    display: block;
}

/* Highlight effect for map areas */
.master-image-container area {
    cursor: pointer;
    outline: none;
}

/* Custom area highlight effect using CSS */
.highlight-area {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    pointer-events: none;
    transition: all 0.3s ease;
    opacity: 0;
}

.highlight-area.active {
    opacity: 1;
}

/* Simple Tooltip - Appears over the map */
.automotive-tooltip {
    position: fixed;
    width: 300px;
    max-height: 350px;
    background: white;
    border: 2px solid #007bff;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: none;
    pointer-events: none;
    padding: 15px;
    font-size: 14px;
    line-height: 1.4;
}

.automotive-tooltip.show {
    display: block;
}

/* Remove arrow since tooltip appears near cursor, not pointing to specific location */

.automotive-tooltip h5 {
    margin: 0 0 10px 0;
    color: #007bff;
    font-size: 16px;
    font-weight: bold;
}

.automotive-tooltip img {
    width: 100%;
    max-width: 200px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.automotive-tooltip p {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 13px;
}

.automotive-tooltip .specs {
    background: #f8f9fa;
    padding: 8px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.automotive-tooltip .specs h6 {
    margin: 0 0 5px 0;
    font-size: 12px;
    font-weight: bold;
    color: #666;
}

.automotive-tooltip .specs ul {
    margin: 0;
    padding-left: 15px;
    font-size: 11px;
}

.automotive-tooltip .specs li {
    margin-bottom: 3px;
}

.automotive-tooltip .quote-btn {
    display: inline-block;
    background: #007bff;
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 12px;
    margin-top: 5px;
}

.automotive-tooltip .quote-btn:hover {
    background: #0056b3;
    color: white;
}

.part-modal .modal-content {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    max-height: 300px;
    overflow-y: auto;
}

.part-modal .modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 0.5rem 0.75rem;
}

.part-modal .modal-title {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.part-modal .modal-body {
    padding: 0.75rem;
}

.part-modal .part-image {
    width: 100%;
    max-width: 150px;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.part-modal .part-image:hover {
    transform: scale(1.02);
}

.part-modal .part-description {
    color: #555;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
}

.part-modal .part-specs {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 0.5rem;
    margin-bottom: 0.75rem;
}

.part-modal .part-specs h6 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 0.8rem;
}

.part-modal .part-specs ul {
    margin-bottom: 0;
    font-size: 0.75rem;
}

.part-modal .part-specs li {
    margin-bottom: 0.25rem;
}

.part-modal .modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 0.5rem 0.75rem;
}

.part-modal .btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Animation for Modal */
.part-modal.fade .modal-dialog {
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.part-modal.show .modal-dialog {
    transform: scale(1);
    opacity: 1;
}



/* Ensure containers don't clip the tooltip */
.master-image-container,
.card,
.section,
.container,
.row,
.col,
.col-lg-10,
.interactive-map-section {
    overflow: visible !important;
    position: relative !important;
}

/* Ensure tooltip can escape any container */
.automotive-tooltip {
    position: fixed !important;
    z-index: 999999 !important;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .automotive-tooltip {
        width: 280px;
        max-height: 320px;
    }

    .automotive-tooltip img {
        max-width: 180px;
    }
}
