/**
 * AIML Game Link Block Frontend Styles
 * Card/tile layout for displaying game links with thumbnails
 */

/* Main Card Container */
.aiml-game-link-card {
    margin: 20px 0;
    max-width: 100%;
}

/* Orientation Classes */
.aiml-game-link-card--vertical .aiml-game-link-card__link {
    display: flex;
    flex-direction: column;
}

.aiml-game-link-card--horizontal .aiml-game-link-card__link {
    display: flex;
    flex-direction: row;
}

.aiml-game-link-card--horizontal .aiml-game-link-card__thumbnail {
    width: 300px;
    height: auto;
    flex-shrink: 0;
}

.aiml-game-link-card--horizontal .aiml-game-link-card__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px 28px;
}

.aiml-game-link-card__link {
    display: block;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid #e2e4e7;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.aiml-game-link-card__link:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #0073aa;
}

.aiml-game-link-card__link:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Thumbnail Section */
.aiml-game-link-card__thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

.aiml-game-link-card__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.aiml-game-link-card__link:hover .aiml-game-link-card__thumbnail img {
    transform: scale(1.05);
}

/* Content Section */
.aiml-game-link-card__content {
    padding: 20px;
}

.aiml-game-link-card__title {
    margin: 0 0 12px 0;
    font-size: 24px;
    font-weight: 700;
    color: #1e1e1e;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.aiml-game-link-card__link:hover .aiml-game-link-card__title {
    color: #0073aa;
}

.aiml-game-link-card__description {
    margin: 0 0 16px 0;
    font-size: 16px;
    line-height: 1.6;
    color: #444;
}

/* Button */
.aiml-game-link-card__button {
    display: inline-block;
    padding: 12px 24px;
    background: #0073aa;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-align: center;
}

.aiml-game-link-card__link:hover .aiml-game-link-card__button {
    background: #005a87;
    transform: translateX(2px);
}

.aiml-game-link-card__link:active .aiml-game-link-card__button {
    transform: translateY(1px);
}

/* Auto Orientation - Responsive Layout */
@media (min-width: 768px) {
    .aiml-game-link-card--auto .aiml-game-link-card__link {
        display: flex;
        flex-direction: row;
    }

    .aiml-game-link-card--auto .aiml-game-link-card__thumbnail {
        width: 300px;
        height: auto;
        flex-shrink: 0;
    }

    .aiml-game-link-card--auto .aiml-game-link-card__content {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 24px 28px;
    }

    .aiml-game-link-card__title {
        font-size: 28px;
    }

    .aiml-game-link-card__button {
        align-self: flex-start;
    }
}

/* Desktop Layout for Auto Orientation */
@media (min-width: 1024px) {
    .aiml-game-link-card--auto {
        max-width: 900px;
        margin: 24px auto;
    }

    .aiml-game-link-card--auto .aiml-game-link-card__thumbnail {
        width: 350px;
    }

    .aiml-game-link-card--auto .aiml-game-link-card__content {
        padding: 32px 40px;
    }

    .aiml-game-link-card--auto .aiml-game-link-card__title {
        font-size: 32px;
        margin-bottom: 16px;
    }

    .aiml-game-link-card--auto .aiml-game-link-card__description {
        font-size: 18px;
        margin-bottom: 20px;
    }

    .aiml-game-link-card--auto .aiml-game-link-card__button {
        padding: 14px 28px;
        font-size: 18px;
    }
}

/* Mobile Optimizations */
@media (max-width: 480px) {
    .aiml-game-link-card {
        margin: 16px 0;
    }

    .aiml-game-link-card__link {
        border-radius: 6px;
    }

    .aiml-game-link-card__thumbnail {
        height: 180px;
    }

    .aiml-game-link-card__content {
        padding: 16px;
    }

    .aiml-game-link-card__title {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .aiml-game-link-card__description {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .aiml-game-link-card__button {
        display: block;
        width: 100%;
        padding: 12px 16px;
        font-size: 16px;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .aiml-game-link-card__link {
        border: 2px solid #000;
    }

    .aiml-game-link-card__link:hover {
        border-color: #0073aa;
        border-width: 3px;
    }

    .aiml-game-link-card__title {
        color: #000;
    }

    .aiml-game-link-card__button {
        border: 2px solid #fff;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .aiml-game-link-card__link {
        background: #1e1e1e;
        border-color: #3c434a;
    }

    .aiml-game-link-card__link:hover {
        background: #2c2c2c;
        border-color: #0073aa;
    }

    .aiml-game-link-card__title {
        color: #e4e6ea;
    }

    .aiml-game-link-card__link:hover .aiml-game-link-card__title {
        color: #4f94d4;
    }

    .aiml-game-link-card__description {
        color: #c3c4c7;
    }

    .aiml-game-link-card__button {
        background: #4f94d4;
        color: #000;
    }

    .aiml-game-link-card__link:hover .aiml-game-link-card__button {
        background: #3582c4;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .aiml-game-link-card__link,
    .aiml-game-link-card__thumbnail img,
    .aiml-game-link-card__title,
    .aiml-game-link-card__button {
        transition: none;
    }

    .aiml-game-link-card__link:hover {
        transform: none;
    }

    .aiml-game-link-card__link:hover .aiml-game-link-card__thumbnail img {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .aiml-game-link-card__link {
        border: 1px solid #000;
        box-shadow: none;
    }

    .aiml-game-link-card__button {
        display: none;
    }

    .aiml-game-link-card__link:hover {
        transform: none;
        box-shadow: none;
    }
}
