/* IIT Companion - Advert cube */

/* Editor-only survival class for replaced widgets (also in other module CSS) */
.iitc-hide-all {
    display: none !important;
}

.elementor-widget-iit_ad_cube {
    width: 100% !important;
    max-width: 100%;
}

.iitc-adcube {
    position: relative;
    width: 100%;
    perspective: 1400px;
}

.iitc-adcube-static img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--iitc-ad-r, 10px);
}

/* The first face stays in normal flow so the cube always has height from
   the image itself, no JavaScript needed; the other faces stack on it. */
.iitc-adcube-box {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 1s cubic-bezier(0.45, 0.05, 0.35, 1);
}

.iitc-adcube-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: var(--iitc-ad-r, 10px);
    overflow: hidden;
    background: #E5F4FF;
}

.iitc-adcube-face:first-child {
    position: relative;
    inset: auto;
}

.iitc-adcube-face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.iitc-adcube-face:first-child img {
    height: auto;
}

.iitc-adcube-face a {
    display: block;
    width: 100%;
    height: 100%;
}

[class*="iitc-adshadow-1"] .iitc-adcube-face,
[class*="iitc-adshadow-1"] .iitc-adcube-static img {
    box-shadow: 0 10px 26px rgba(0, 45, 116, 0.18);
}

/* Editor placeholder */

.iitc-adcube-editor {
    border: 1px dashed #B9C9E4;
    border-radius: var(--iitc-ad-r, 10px);
    background: #F5F9FF;
    color: #4A5C7D;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
    padding: 34px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.iitc-adcube-editor-mark {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #002D74;
    color: #FFB000;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.iitc-adcube-editor-count {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 45, 116, 0.85);
    color: #FFFFFF;
    font-size: 11px;
    line-height: 1;
    padding: 5px 9px;
    border-radius: 10px;
    pointer-events: none;
}

.iitc-adcube-none {
    border: 1px dashed #B9C9E4;
    border-radius: 10px;
    color: #4A5C7D;
    font-size: 13px;
    padding: 24px 16px;
    text-align: center;
}
