/**
 * Superb Addons Frontend Styles
 * Optimized and lightweight CSS for all blocks
 */

/* Rating Block */
.superb-rating-block {
    margin: 20px 0;
}

.superb-rating-stars {
    display: flex;
    align-items: center;
    gap: 5px;
}

.superb-star {
    font-size: 24px;
    color: #ddd;
}

.superb-star.filled {
    color: #ffc107;
}

.superb-rating-value {
    margin-left: 10px;
    font-size: 14px;
    color: #666;
}

.superb-rating-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    margin-top: 10px;
    overflow: hidden;
}

.superb-rating-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffc107 0%, #ff9800 100%);
    transition: width 0.3s ease;
}

/* Accordion Block */
.superb-accordion {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.superb-accordion-item {
    border-bottom: 1px solid #e0e0e0;
}

.superb-accordion-item:last-child {
    border-bottom: none;
}

.superb-accordion-header {
    width: 100%;
    padding: 15px 20px;
    background: #f9f9f9;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.2s ease;
}

.superb-accordion-header:hover {
    background: #f0f0f0;
}

.superb-accordion-icon {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.superb-accordion-header[aria-expanded="true"] .superb-accordion-icon {
    transform: rotate(45deg);
}

.superb-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.superb-accordion-header[aria-expanded="true"] + .superb-accordion-content {
    max-height: 1000px;
    padding: 15px 20px;
}

/* Author Box Block */
.superb-author-box {
    display: flex;
    gap: 20px;
    padding: 25px;
    background: #f9f9f9;
    border-radius: 8px;
    margin: 30px 0;
}

.superb-author-avatar img {
    border-radius: 50%;
    width: 96px;
    height: 96px;
}

.superb-author-info {
    flex: 1;
}

.superb-author-name {
    margin: 0 0 10px 0;
    font-size: 20px;
}

.superb-author-bio {
    color: #666;
    margin: 0 0 15px 0;
    line-height: 1.6;
}

.superb-author-social {
    display: flex;
    gap: 15px;
}

.superb-author-social a {
    color: #0073aa;
    text-decoration: none;
    transition: color 0.2s ease;
}

.superb-author-social a:hover {
    color: #005177;
}

/* Table of Contents Block */
.superb-table-of-contents {
    background: #f9f9f9;
    border-left: 4px solid #0073aa;
    padding: 20px 25px;
    margin: 30px 0;
}

.superb-table-of-contents h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

.superb-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.superb-toc-item {
    margin-bottom: 8px;
}

.superb-toc-item a {
    color: #0073aa;
    text-decoration: none;
    transition: color 0.2s ease;
}

.superb-toc-item a:hover {
    color: #005177;
    text-decoration: underline;
}

/* Recent Posts Block */
.superb-recent-posts {
    display: grid;
    gap: 25px;
}

.superb-recent-post {
    display: flex;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.superb-recent-post:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.superb-post-thumbnail {
    flex-shrink: 0;
}

.superb-post-thumbnail img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
}

.superb-post-content {
    flex: 1;
}

.superb-post-title {
    margin: 0 0 8px 0;
    font-size: 18px;
}

.superb-post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.superb-post-title a:hover {
    color: #0073aa;
}

.superb-post-meta {
    color: #999;
    font-size: 14px;
    margin-bottom: 10px;
}

.superb-post-excerpt {
    color: #666;
    line-height: 1.6;
}

/* Google Maps Block */
.superb-google-maps {
    border-radius: 8px;
    overflow: hidden;
    margin: 20px 0;
}

.superb-google-maps iframe {
    display: block;
}

/* Cover Image Block */
.superb-cover-image {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    margin: 20px 0;
}

.superb-cover-image img {
    width: 100%;
    height: auto;
    display: block;
}

.superb-cover-image[data-aspect-ratio="16:9"] {
    aspect-ratio: 16 / 9;
}

.superb-cover-image[data-aspect-ratio="4:3"] {
    aspect-ratio: 4 / 3;
}

.superb-cover-image[data-aspect-ratio="1:1"] {
    aspect-ratio: 1 / 1;
}

/* Coupon Reveal Block */
.superb-coupon-reveal {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    margin: 30px 0;
}

.superb-coupon-button {
    background: white;
    color: #667eea;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.superb-coupon-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.superb-coupon-code {
    margin-top: 20px;
}

.superb-coupon-code-text {
    display: inline-block;
    background: white;
    color: #333;
    padding: 15px 30px;
    font-size: 24px;
    font-weight: bold;
    border-radius: 8px;
    letter-spacing: 2px;
}

/* Responsive Controls */
@media (max-width: 768px) {
    .superb-hide-mobile {
        display: none !important;
    }
    
    .superb-author-box {
        flex-direction: column;
    }
    
    .superb-recent-post {
        flex-direction: column;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .superb-hide-tablet {
        display: none !important;
    }
}

@media (min-width: 1025px) {
    .superb-hide-desktop {
        display: none !important;
    }
}
