/* file: /css/storybot-story-service-boxes-style.css */

/* Theme Variables */
:root {
    /* Dark Theme (Default) */
    --storybot-services-bg-primary: #1a1a1a;
    --storybot-services-bg-secondary: #2a2a2a;
    --storybot-services-bg-tertiary: #3a3a3a;
    --storybot-services-bg-card: #3a3a3a;
    --storybot-services-bg-hover: #4b4b4b;
    --storybot-services-bg-button: rgba(92, 107, 192, 0.8);
    --storybot-services-bg-button-hover: #4BB543;
    
    --storybot-services-text-primary: #ddd;
    --storybot-services-text-secondary: #c0c0c0;
    --storybot-services-text-white: #fff;
    
    --storybot-services-border-primary: #555;
    
    --storybot-services-shadow-light: rgba(0, 0, 0, 0.2);
    
    /* Status colors remain consistent across themes */
    --storybot-services-status-available: #acd68f;
    --storybot-services-status-credits: #fade93;
    --storybot-services-status-unavailable: #f3bebe;
    --storybot-services-coin-color: #FFD700;
}

/* Light Theme */
.storybot-theme-light {
    --storybot-services-bg-primary: #ffffff;
    --storybot-services-bg-secondary: #f8f9fa;
    --storybot-services-bg-tertiary: #e9ecef;
    --storybot-services-bg-card: #ffffff;
    --storybot-services-bg-hover: #f0f0f0;
    --storybot-services-bg-button: rgba(92, 107, 192, 0.9);
    --storybot-services-bg-button-hover: #22c55e;
    
    --storybot-services-text-primary: #333333;
    --storybot-services-text-secondary: #495057;
    --storybot-services-text-white: #fff;
    
    --storybot-services-border-primary: #dee2e6;
    
    --storybot-services-shadow-light: rgba(0, 0, 0, 0.1);
    
    /* Status colors remain consistent across themes */
    --storybot-services-status-available: #28a745;
    --storybot-services-status-credits: #ffc107;
    --storybot-services-status-unavailable: #dc3545;
    --storybot-services-coin-color: #FFD700;
}

/* Full-Width Container for Story Services */
.story-services {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 equal columns for each box */
    gap: 20px;
    box-sizing: border-box;
    width: 100%;
}

/* Individual Service Box Styling */
.service-box {
    background-color: var(--storybot-services-bg-card);
    border: 1px solid var(--storybot-services-border-primary);
    border-radius: 8px;
    box-shadow: 0 4px 8px var(--storybot-services-shadow-light);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    text-align: center;
    color: var(--storybot-services-text-primary);
    transition: transform 0.2s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.service-box:hover {
    transform: translateY(-5px);
    background-color: var(--storybot-services-bg-hover);
}

/* Title Styling with Consistent Height */
.service-title {
    font-size: 1.4em;
    font-weight: bold;
    color: var(--storybot-services-text-secondary);
    margin-bottom: 15px;
    min-height: 3em;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: color 0.3s ease;
}

/* Content Area Styling with Consistent Height */
.service-content {
    position: relative;
    margin: 15px 0;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-content img,
.service-content {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    display: block;
}

.bw-single-image img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    display: block;
    object-fit: cover; /* Ensures images are cropped consistently */
}

/* Centered Overlay Button Styling */
/* Styled "button" div */
.play-audio-button,
.play-song-button,
.print-coloring-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--storybot-services-bg-button);
    color: var(--storybot-services-text-white);
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, color 0.3s ease;
    z-index: 10;
}

.play-audio-button i,
.play-song-button i,
.print-coloring-button i {
    margin-right: 8px;
}

.play-audio-button:hover,
.play-song-button:hover,
.print-coloring-button:hover {
    background-color: var(--storybot-services-bg-button-hover);
    color: var(--storybot-services-text-white);
}

/* Status Text Styling */
.service-status {
    font-size: 0.9em;
    font-weight: bold;
    margin-top: 10px;
    transition: color 0.3s ease;
}

/* Consistent Gold Color for Coin Icons */
.service-status i.fa-coins {
    color: var(--storybot-services-coin-color);
}

/* Specific Status Colors */
.service-status.audio-exists,
.service-status.song-exists,
.service-status.image-exists { /* Green for all "kostenlos" statuses */
    color: var(--storybot-services-status-available) !important; /* Force green color if any conflicts */
}

.audio-credits .service-status,
.song-credits .service-status {
    color: var(--storybot-services-status-credits); /* Gold for credits-required content */
}

.no-audio-no-credits .service-status,
.no-song-no-credits .service-status {
    color: var(--storybot-services-status-unavailable); /* Red for unavailable content */
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .story-services {
        grid-template-columns: 1fr; /* Single column on mobile */
        padding: 0px;
    }

    .service-box {
        padding: 15px;
    }

    .service-title {
        font-size: 1.2em;
    }
}
