/**
 * Interactive Cards Styles
 */

.wml-interactive-cards {
    width: 100%;
    position: relative;
}

.wml-ic-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Grid Layout Override */
.wml-ic-container.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* Card Styles */
.wml-ic-card {
    background: #fff;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border: 1px solid transparent;
}

.wml-interactive-cards[data-layout="grid"] .wml-ic-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

.wml-ic-card:hover {
    background-color: #f5f5f5;
}

.wml-ic-card-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.wml-interactive-cards[data-layout="grid"] .wml-ic-card-inner {
    flex-direction: column;
    width: 100%;
    align-items: flex-start;
    gap: 0.5rem;
}

.wml-ic-img-wrapper {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.wml-interactive-cards[data-layout="grid"] .wml-ic-img-wrapper {
    width: 100%;
    height: auto;
    aspect-ratio: 6/4;
}

.wml-ic-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wml-ic-info {
    display: flex;
    flex-direction: column;
}

.wml-interactive-cards[data-layout="grid"] .wml-ic-info {
    text-align: left;
    width: 100%;
}

.wml-ic-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: #333;
}

.wml-ic-desc {
    font-size: 0.875rem;
    color: #666;
    margin: 0;
}

.wml-ic-cta {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background-color: #f3f4f6;
    color: #000;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.wml-ic-cta:hover {
    background-color: #22c55e;
    color: white;
}

/* Modal Styles */
.wml-ic-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.wml-ic-modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.wml-ic-modal-wrapper {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.wml-ic-modal-wrapper.active {
    display: flex;
}

.wml-ic-modal-card {
    background: white;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    opacity: 0;
    transform-origin: center;
    pointer-events: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.wml-ic-modal-wrapper.active .wml-ic-modal-card {
    opacity: 1;
}

.wml-ic-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.wml-ic-modal-image-wrapper {
    width: 100%;
    height: 320px;
    flex-shrink: 0;
}

.wml-ic-modal-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wml-ic-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    background: white;
}

.wml-ic-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1.5rem;
}

.wml-ic-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    color: #333;
}

.wml-ic-modal-desc {
    font-size: 1rem;
    color: #666;
    margin: 0;
}

.wml-ic-modal-cta {
    padding: 0.75rem 1.5rem;
    background-color: #22c55e;
    color: white;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.875rem;
    flex-shrink: 0;
    margin-left: 1rem;
}

.wml-ic-modal-content {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #4b5563;
}

/* Animation Classes */
.wml-ic-animating {
    transition: transform 0.4s cubic-bezier(0.2, 0, 0.2, 1),
        width 0.4s cubic-bezier(0.2, 0, 0.2, 1),
        height 0.4s cubic-bezier(0.2, 0, 0.2, 1),
        opacity 0.2s ease;
}