/* ===== Google Reviews Widget ===== */

/* --- Reset & Base --- */
.grw-slider-wrapper,
.grw-grid-wrapper {
    box-sizing: border-box;
    line-height: 1.5;
}
.grw-slider-wrapper *,
.grw-grid-wrapper * {
    box-sizing: border-box;
}

/* --- Card --- */
.grw-card {
    padding: 24px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: box-shadow 0.2s ease;
}
.grw-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Card header */
.grw-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.grw-card-meta {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}
.grw-card-name {
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.grw-card-date {
    font-size: 13px;
}
.grw-card-google {
    flex-shrink: 0;
    line-height: 1;
}
.grw-card-google svg {
    display: block;
}

/* Avatar */
.grw-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}
.grw-avatar-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
}

/* Stars */
.grw-stars {
    display: flex;
    gap: 2px;
}
.grw-star {
    font-size: 18px;
    line-height: 1;
}

/* Card text */
.grw-card-text {
    font-size: 14px;
    line-height: 1.6;
}
.grw-read-more {
    display: inline-block;
    margin-top: 4px;
    font-size: 13px;
    color: inherit;
    opacity: 0.7;
    text-decoration: none;
    cursor: pointer;
}
.grw-read-more:hover {
    opacity: 1;
}

/* --- Modus 1: Slider --- */
.grw-slider-columns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 20px;
    align-items: start;
}

/* Slider column — spans first 2 of 4 columns */
.grw-slider-col {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
}

/* Slider track */
.grw-slider-track {
    position: relative;
}
.grw-slide {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.grw-slide-active {
    display: grid;
}
.grw-slide .grw-card {
    height: auto;
}

/* Dots */
.grw-slider-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding-top: 12px;
}
.grw-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: #d4c96a;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease;
}
.grw-dot-active {
    background: #2d4a1a;
}
.grw-dot:hover {
    background: #8a7d30;
}
.grw-dot-active:hover {
    background: #2d4a1a;
}

/* Stats — each stat-box is its own grid column */
.grw-stats-col {
    display: contents;
}
.grw-stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 20px 12px;
    text-align: center;
    border-radius: 8px;
}
.grw-stat-number {
    font-weight: 700;
    line-height: 1;
    color: #333;
}
.grw-stat-label {
    font-size: 15px;
    color: #666;
    margin-top: 4px;
}
.grw-stat-box .grw-stars {
    justify-content: center;
}
.grw-stat-box .grw-star {
    font-size: 24px;
}
.grw-stat-box svg {
    display: block;
}

/* --- Modus 2: Grid --- */
.grw-grid {
    display: grid;
    gap: 20px;
}

/* Lazy load spinner */
.grw-lazy-loader {
    display: flex;
    justify-content: center;
    padding: 40px 0;
}
.grw-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #eee;
    border-top-color: #4285F4;
    border-radius: 50%;
    animation: grw-spin 0.7s linear infinite;
}
@keyframes grw-spin {
    to { transform: rotate(360deg); }
}

/* No reviews */
.grw-no-reviews {
    padding: 40px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .grw-slider-columns {
        grid-template-columns: 1fr 1fr;
    }
    .grw-slider-col {
        grid-column: span 2;
    }
    .grw-stats-col {
        display: contents;
    }
}

@media (max-width: 768px) {
    .grw-slider-columns {
        grid-template-columns: 1fr;
    }
    .grw-slider-col {
        grid-column: span 1;
    }
    .grw-slide {
        grid-template-columns: 1fr;
    }
    .grw-grid {
        grid-template-columns: 1fr !important;
    }
    .grw-card {
        padding: 16px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .grw-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* --- Admin styles --- */
.grw-admin-wrap .nav-tab-wrapper {
    margin-bottom: 20px;
}
.grw-admin-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: center;
}
.grw-admin-stat {
    background: #fff;
    padding: 16px 24px;
    border: 1px solid #ddd;
    border-radius: 6px;
}
.grw-admin-stat strong {
    display: block;
    font-size: 24px;
    color: #333;
}
.grw-admin-stat span {
    color: #666;
    font-size: 13px;
}
.grw-shortcode-box {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}
.grw-shortcode-box h3 {
    margin-top: 0;
}
.grw-shortcode-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.grw-shortcode-row:last-child {
    margin-bottom: 0;
}
.grw-shortcode-row label {
    min-width: 120px;
    font-weight: 600;
}
.grw-shortcode-row code {
    background: #fff;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    user-select: all;
}
.grw-copy-btn {
    cursor: pointer;
}
.grw-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 16px;
}
