/* Veloxity Flipping Cards Widget Styles */

.vlx-flipping-cards-container {
    width: 1000px;
    height: 1400px;
    margin: 0 auto;
    box-sizing: border-box;
}

.vlx-flipping-cards-grid {
    display: grid;
    grid-template-columns: repeat(var(--vlx-fc-columns, 4), 1fr);
    grid-template-rows: repeat(var(--vlx-fc-rows, 4), 1fr);
    width: 100%;
    height: 100%;
    column-gap: 10px;
    row-gap: 10px;
    padding: 15px;
    box-sizing: border-box;
}

/* Flip Card Structure */
.vlx-flip-card {
    perspective: 1000px;
    cursor: pointer;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

/* Elevate flipping and flipped cards above others */
.vlx-flip-card.is-animating,
.vlx-flip-card.is-flipped {
    z-index: 10;
}

.vlx-flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform var(--vlx-fc-flip-duration, 0.6s) ease-in-out;
}

/* Flip state */
.vlx-flip-card.is-flipped .vlx-flip-card-inner {
    transform: rotateY(180deg);
}

/* Card faces */
.vlx-flip-card-front,
.vlx-flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vlx-flip-card-back {
    /* No background - images only */
}

.vlx-flip-card-front {
    transform: rotateY(180deg);
    /* No background - images only */
}

/* Images */
.vlx-flip-card-front img,
.vlx-flip-card-back img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block;
}

/* Placeholder for missing images */
.vlx-flip-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: bold;
}

.vlx-flip-card-placeholder-front {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

/* Hover effect */
.vlx-flip-card:hover .vlx-flip-card-inner {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Active/pressed state */
.vlx-flip-card:active .vlx-flip-card-inner {
    transform: scale(0.98);
}

.vlx-flip-card.is-flipped:active .vlx-flip-card-inner {
    transform: rotateY(180deg) scale(0.98);
}

/* Disable pointer events during flip animation */
.vlx-flip-card.is-animating {
    pointer-events: none;
}

/* Error message */
.vlx-flipping-cards-error {
    padding: 20px;
    text-align: center;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

/* Editor placeholder styling */
.elementor-editor-active .vlx-flipping-cards-container {
    min-height: 400px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .vlx-flip-card-placeholder {
        font-size: 1rem;
    }
}
