/*
 * Genn Support Widget Styles
 * Responsive design for all devices
 */

.genn-support-widget {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 1rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.gsw-container {
    width: 100%;
}

.gsw-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 2rem;
    border-bottom: 3px solid #e74c3c;
    padding-bottom: 0.5rem;
}

/* CSS Grid Layout for responsive design */
.gsw-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gsw-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.gsw-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gsw-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #e74c3c, #3498db);
}

.gsw-thumbnail {
    text-align: center;
    margin-bottom: 1rem;
}

.gsw-img {
    max-width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.gsw-item-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.8rem;
    text-align: center;
}

.gsw-description {
    font-size: 0.95rem;
    color: #5a6c7d;
    line-height: 1.5;
    margin-bottom: 1rem;
    text-align: center;
}

.gsw-quote {
    font-size: 0.85rem;
    color: #7f8c8d;
    font-style: italic;
    margin-bottom: 1rem;
    text-align: center;
    border-left: 3px solid #e74c3c;
    padding-left: 1rem;
}

.gsw-guests {
    font-size: 0.9rem;
    color: #3498db;
    font-weight: 500;
    margin-bottom: 1rem;
    text-align: center;
}

.gsw-button {
    display: inline-block;
    width: 100%;
    padding: 12px 20px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
}

/* Specific button colors */
.gsw-book-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.gsw-book-btn:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
}

.gsw-patreon-btn {
    background: linear-gradient(135deg, #f96854, #ff5722);
    color: white;
}

.gsw-patreon-btn:hover {
    background: linear-gradient(135deg, #ff5722, #e64a19);
    transform: translateY(-2px);
}

.gsw-youtube-btn {
    background: linear-gradient(135deg, #ff0000, #cc0000);
    color: white;
}

.gsw-youtube-btn:hover {
    background: linear-gradient(135deg, #cc0000, #990000);
    transform: translateY(-2px);
}

.gsw-ebook-btn {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.gsw-ebook-btn:hover {
    background: linear-gradient(135deg, #2ecc71, #58d68d);
    transform: translateY(-2px);
}

.gsw-newsletter-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.gsw-newsletter-btn:hover {
    background: linear-gradient(135deg, #2980b9, #1f618d);
    transform: translateY(-2px);
}

/* Responsive Design Breakpoints */

/* Tablet styles */
@media (max-width: 768px) {
    .genn-support-widget {
        margin: 1rem auto;
        padding: 1rem;
    }

    .gsw-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .gsw-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
        gap: 1.2rem;
    }

    .gsw-item {
        padding: 1.2rem;
    }

    .gsw-img {
        height: 100px;
    }

    .gsw-item-title {
        font-size: 1.2rem;
    }
}

/* Mobile styles */
@media (max-width: 480px) {
    .genn-support-widget {
        margin: 0.5rem auto;
        padding: 0.8rem;
        border-radius: 8px;
    }

    .gsw-title {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    .gsw-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 1rem;
    }

    .gsw-item {
        padding: 1rem;
    }

    .gsw-img {
        height: 80px;
    }

    .gsw-item-title {
        font-size: 1.1rem;
    }

    .gsw-description {
        font-size: 0.9rem;
    }

    .gsw-button {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

/* High DPI / Retina displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .gsw-img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .genn-support-widget {
        background: #2c3e50;
        color: #ecf0f1;
    }

    .gsw-item {
        background: #34495e;
    }

    .gsw-title {
        color: #ecf0f1;
    }

    .gsw-item-title {
        color: #ecf0f1;
    }

    .gsw-description {
        color: #bdc3c7;
    }
}

/* Print styles */
@media print {
    .genn-support-widget {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .gsw-button {
        background: transparent !important;
        color: #000 !important;
        border: 1px solid #000;
    }

    .gsw-item:hover {
        transform: none;
        box-shadow: none;
    }
}

/* Accessibility improvements */
.gsw-button:focus {
    outline: 3px solid #3498db;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .gsw-item,
    .gsw-button {
        transition: none;
    }

    .gsw-item:hover {
        transform: none;
    }
}

/* Loading state */
.gsw-loading {
    opacity: 0.7;
    pointer-events: none;
}

.gsw-loading .gsw-button {
    background: #95a5a6 !important;
}