/**
 * Public styles for ADI Image Hotspot plugin
 */

/* Container Styles */
.adi-hotspot-container {
    position: relative;
    width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.adi-hotspot-wrapper {
    position: relative;
    width: 100%;
}

.adi-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    background: #f8f9fa;
}

.adi-hotspot-image {
    width: 100%;
    height: auto;
    display: block;
    max-width: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Hotspot Points */
.adi-hotspot-point {
    position: absolute;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 10;
    transform: translate(-50%, -50%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.adi-hotspot-point:hover {
    transform: translate(-50%, -50%) scale(1.1);
    z-index: 20;
}

.adi-hotspot-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    border: 3px solid #ca2920;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 3;
}

.adi-hotspot-point:hover .adi-hotspot-icon {
    background: linear-gradient(135deg, #f8f8f8 0%, #e8e8e8 100%);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
    transform: scale(1.05);
}

.adi-hotspot-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.adi-hotspot-icon img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.adi-default-icon {
    font-size: 18px;
    font-weight: bold;
}

/* Pulse Animation */
.adi-hotspot-pulse {
    position: absolute;
    top: 40%;
    left: 40%;
    width: 40px;
    height: 40px;
    border: 2px solid #667eea;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: adi-pulse 2s infinite;
    opacity: 0.7;
    z-index: 2;
}

@keyframes adi-pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.7;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0.3;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.6);
        opacity: 0;
    }
}

.adi-hotspot-point:hover .adi-hotspot-pulse {
    animation-play-state: paused;
    opacity: 0;
}

/* Content Panel */
.adi-content-panel {
    width: 320px;
    max-height: 80vh;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #ddd;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    opacity: 0;
    transform: translateX(100%) translateY(-50%);
    transition: transform 0.4s ease, opacity 0.4s ease;
    position: fixed;
    top: 50%;
    right: 24px;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.adi-content-panel.active {
    opacity: 1;
    transform: translateX(0) translateY(-50%);
}

.adi-content-header {
    padding: 20px 20px 16px;
    background: linear-gradient(135deg, #ca2920, #a3201a);
    color: #fff;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.adi-content-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.adi-content-close {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.adi-content-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.adi-content-close svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.adi-content-body {
    display: flex;
    flex-direction: column;
}

/* Content Blocks */
.adi-content-block {
    border-bottom: 1px solid #ddd;
    padding: 12px;
    background-color: #fafafa;
    transition: background-color 0.3s ease;
}

.adi-content-block:hover {
    background-color: #f2f2f2;
}

.adi-content-block:last-child {
    border-bottom: none;
}

.adi-content-block img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.adi-content-block p {
    margin: 0 0 16px 0;
    color: #4a5568;
    line-height: 1.6;
    font-size: 15px;
}

.adi-content-block p:last-child {
    margin-bottom: 0;
}
.adi-content-image img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;    
    border: 1px solid #ddd;
}

/* Text block styling */
.adi-content-text p {
    font-size: 0.9rem;
    color: #333;
    margin: 0;
    line-height: 1.4;
    text-align: start !important;
}

.adi-content-block h1,
.adi-content-block h2,
.adi-content-block h3,
.adi-content-block h4,
.adi-content-block h5,
.adi-content-block h6 {
    color: #2d3748;
    margin: 0 0 12px 0;
    font-weight: 600;
}

.adi-content-block ul,
.adi-content-block ol {
    margin: 0 0 16px 0;
    padding-left: 20px;
    color: #4a5568;
}

.adi-content-block li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.adi-content-block a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.adi-content-block a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Content Type Specific Styles */
/* .adi-content-image-only {
    width: 100%;
}

.adi-content-image-only img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.adi-content-text-only {
    width: 100%;
}

.adi-content-mixed {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.adi-content-mixed .adi-content-image {
    width: 100%;
    order: 1;
}

.adi-content-mixed .adi-content-image img {
    width: 50%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.adi-content-mixed .adi-content-text {
    width: 100%;
    order: 2;
} */

/* Alternative layout for mixed content - side by side */
.adi-content-mixed.adi-layout-horizontal {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
}

.adi-content-mixed.adi-layout-horizontal .adi-content-image {
    width: 40%;
    order: 1;
}

.adi-content-mixed.adi-layout-horizontal .adi-content-text {
    width: 60%;
    order: 2;
}

/* Alternative layout for mixed content - image on right */
.adi-content-mixed.adi-layout-image-right .adi-content-image {
    order: 2;
}

.adi-content-mixed.adi-layout-image-right .adi-content-text {
    order: 1;
}

/* Horizontal layout with equal proportions */
/* .adi-content-mixed.adi-layout-horizontal .adi-content-image,
.adi-content-mixed.adi-layout-horizontal .adi-content-text {
    width: 50%;
} */

.adi-content-image img{
    width: 80px !important;
    height: 80px !important;
    border-radius: 50% !important;
}


.adi-content-header h3{
    font-size: medium;
    margin-bottom: 0px !important;
}

.adi-content-text h1,
.adi-content-text h2,
.adi-content-text h3,
.adi-content-text h4,
.adi-content-text h5,
.adi-content-text h6,
.adi-content-text p,
.adi-content-text span,
.adi-content-text li {
    font-size: small;
    margin: 0;
}

/* Modal Styles */
.adi-hotspot-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.adi-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.adi-hotspot-modal.active .adi-modal-backdrop {
    opacity: 1;
}

.adi-modal-container {
    position: relative;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.adi-hotspot-modal.active .adi-modal-container {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.adi-modal-content {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.adi-modal-header {
    padding: 32px 32px 24px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.adi-modal-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #2d3748;
    line-height: 1.3;
    flex: 1;
}

.adi-modal-close {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #718096;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.adi-modal-close:hover {
    background: #f7fafc;
    color: #4a5568;
    transform: scale(1.05);
}

.adi-modal-close svg {
    width: 20px;
    height: 20px;
}

.adi-modal-body {
    padding: 0;
    overflow-y: auto;
    flex: 1;
}

/* Loading States */
.adi-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #718096;
    font-size: x-small;
}

.adi-loading::after {
    content: '';
    width: 24px;
    height: 24px;
    border: 2px solid #e2e8f0;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: adi-spin 1s linear infinite;
    margin-left: 12px;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .adi-content-panel {
        width: 90%;
        right: 5%;
        left: 5%;
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .adi-content-panel {
        width: calc(100% - 20px);
        right: 10px;
        left: 10px;
        top: 10px;
        max-height: calc(100vh - 20px);
        border-radius: 12px;
    }
    
    .adi-hotspot-point {
        width: 36px;
        height: 36px;
    }
    
    .adi-hotspot-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .adi-hotspot-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .adi-hotspot-icon img {
        width: 24px;
        height: 24px;
    }
    
    .adi-hotspot-pulse {
        width: 36px;
        height: 36px;
    }
    
    .adi-content-header,
    .adi-content-block {
        padding: 20px;
    }
    
    .adi-content-title {
        font-size: 18px;
    }
    
    .adi-modal-header {
        padding: 24px 24px 20px;
    }
    
    .adi-modal-title {
        font-size: 20px;
    }
    
    .adi-modal-close {
        width: 36px;
        height: 36px;
    }
    
    .adi-modal-close svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .adi-hotspot-container {
        margin: 0 -10px;
    }
    
    .adi-image-wrapper {
        border-radius: 8px;
    }
    
    .adi-content-panel {
        border-radius: 12px;
    }
    
    .adi-content-header,
    .adi-content-block {
        padding: 16px;
    }
    
    .adi-modal-header {
        padding: 20px 20px 16px;
    }
    
    .adi-hotspot-modal {
        padding: 10px;
    }
    
    .adi-modal-content {
        border-radius: 16px;
    }
}


/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .adi-hotspot-point,
    .adi-hotspot-icon,
    .adi-content-panel,
    .adi-modal-container,
    .adi-modal-backdrop,
    .adi-content-close,
    .adi-modal-close {
        transition: none;
    }
    
    .adi-hotspot-pulse {
        animation: none;
        opacity: 0.5;
    }
    
    .adi-loading::after {
        animation: none;
    }
}




/* Hotspot Title */
.adi-hotspot-title {
    position: absolute;
    bottom: -6px; /* below the icon */
    left: 40%;
    transform: translateX(-50%);
    z-index: 1; /* always under icon & pulse */
    background: rgba(255,255,255,0.8);
    padding: 0 3px;
    border-radius: 5px;
    font-size: 10px;
    white-space: nowrap;
    line-height: 15px;
}
