/* ==========================================================================
   BuddyBoss Group Videos – Frontend Styles  v1.0.3
   ========================================================================== */

/* ─── Wrapper ─────────────────────────────────────────────── */
#bbgv-group-videos {
    max-width: 100%;
    padding: 0;
}

/* ─── Notices ─────────────────────────────────────────────── */
.bbgv-notice {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
}
.bbgv-notice-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}
.bbgv-notice-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}
.bbgv-notice-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* ─── Formular-Bereich ────────────────────────────────────── */
.bbgv-add-video-section {
    margin-bottom: 24px;
}

/* Toggle-Button: kein Dashicon mehr, reines Text-Button */
.bbgv-toggle-form {
    display: inline-block;
    padding: 10px 20px;
    background: var(--bb-primary-color, #007cba);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    text-decoration: none;
}
.bbgv-toggle-form:hover {
    background: var(--bb-primary-color-dark, #005a8e);
    color: #fff;
}

.bbgv-form-wrapper {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 24px;
    margin-top: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.bbgv-form-wrapper h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
    color: #1a202c;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 12px;
}

.bbgv-form-row {
    margin-bottom: 16px;
}
.bbgv-form-row label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #4a5568;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.bbgv-form-row-inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Eingabefelder */
.bbgv-input,
.bbgv-select,
.bbgv-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 14px;
    color: #2d3748;
    background: #f7fafc;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.bbgv-input:focus,
.bbgv-select:focus,
.bbgv-textarea:focus {
    outline: none;
    border-color: var(--bb-primary-color, #007cba);
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.15);
    background: #fff;
}
.bbgv-input.bbgv-input-small {
    width: auto;
    max-width: 140px;
}
.bbgv-input.bbgv-input-time {
    width: auto;
    max-width: 100px;
    font-family: monospace;
    letter-spacing: 1px;
}
.bbgv-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.bbgv-input-suffix {
    font-size: 14px;
    color: #718096;
    font-weight: 600;
    white-space: nowrap;
}
.bbgv-field-hint {
    display: block;
    font-size: 12px;
    color: #718096;
    margin-top: 4px;
}
.bbgv-char-count {
    display: block;
    font-size: 12px;
    color: #718096;
    text-align: right;
    margin-top: 4px;
}

/* YouTube-Vorschau im Formular */
.bbgv-preview-wrapper {
    margin-top: 12px;
}
.bbgv-preview-label {
    font-size: 12px;
    color: #718096;
    margin-bottom: 6px;
}

.bbgv-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
}

/* Buttons */
.bbgv-btn {
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    display: inline-block;
    text-decoration: none;
}
.bbgv-btn-primary {
    background: var(--bb-primary-color, #007cba);
    color: #fff;
}
.bbgv-btn-primary:hover {
    background: var(--bb-primary-color-dark, #005a8e);
    color: #fff;
}
.bbgv-btn-secondary {
    background: #edf2f7;
    color: #4a5568;
}
.bbgv-btn-secondary:hover {
    background: #e2e8f0;
}

/* ─── Login-Hinweis ───────────────────────────────────────── */
.bbgv-login-hint {
    color: #718096;
    font-style: italic;
    margin-bottom: 16px;
}

/* ─── Sortier-Leiste ──────────────────────────────────────── */
.bbgv-sort-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    flex-wrap: wrap;
}
.bbgv-sort-label {
    font-size: 13px;
    font-weight: 600;
    color: #718096;
    margin-right: 4px;
}
.bbgv-sort-link {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #4a5568;
    text-decoration: none;
    border: 1px solid #cbd5e0;
    background: #fff;
    transition: all 0.2s ease;
}
.bbgv-sort-link:hover,
.bbgv-sort-link.active {
    background: var(--bb-primary-color, #007cba);
    color: #fff;
    border-color: var(--bb-primary-color, #007cba);
}
.bbgv-video-count {
    margin-left: auto;
    font-size: 13px;
    color: #718096;
    font-weight: 500;
}

/* ─── Leerer Zustand ──────────────────────────────────────── */
.bbgv-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
}
.bbgv-empty-icon {
    font-size: 48px;
    display: block;
    margin: 0 auto 16px;
    color: #cbd5e0;
    line-height: 1;
}
.bbgv-empty-state p {
    font-size: 16px;
    margin: 8px 0;
}

/* ─── Video-Grid ──────────────────────────────────────────── */
.bbgv-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* ─── Video-Karte ─────────────────────────────────────────── */
.bbgv-video-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.bbgv-video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.10);
}

/* ─── Video-Embed (16:9) ──────────────────────────────────── */
.bbgv-video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #000;
}
.bbgv-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.bbgv-no-embed {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.bbgv-no-embed a {
    color: #fff;
    text-decoration: underline;
}

/* ─── Karten-Inhalt ───────────────────────────────────────── */
.bbgv-card-body {
    padding: 16px;
}
.bbgv-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 10px;
    line-height: 1.4;
}

/* ─── Meta-Badges (ohne Dashicons) ───────────────────────── */
.bbgv-card-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.bbgv-meta-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}
.bbgv-badge-year {
    background: #ebf8ff;
    color: #2b6cb0;
    border: 1px solid #bee3f8;
}
.bbgv-badge-distance {
    background: #f0fff4;
    color: #276749;
    border: 1px solid #c6f6d5;
}
.bbgv-badge-wetter {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}
/* Anspruch-Badges farblich differenziert */
.bbgv-badge-anspruch              { background: #f3f4f6; color: #374151; border: 1px solid #d1d5db; }
.bbgv-anspruch-leicht             { background: #f0fff4; color: #276749; border: 1px solid #c6f6d5; }
.bbgv-anspruch-mittel             { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.bbgv-anspruch-schwer             { background: #fff1f2; color: #9f1239; border: 1px solid #fecdd3; }
.bbgv-anspruch-extrem             { background: #3b0764; color: #e9d5ff; border: 1px solid #6b21a8; }

/* ─── Detailtabelle ───────────────────────────────────────── */
.bbgv-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 12px;
    table-layout: fixed;
}
.bbgv-detail-table th,
.bbgv-detail-table td {
    padding: 5px 6px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #f0f0f0;
    word-break: break-word;
}
.bbgv-detail-table th {
    width: 46%;
    color: #718096;
    font-weight: 600;
}
.bbgv-detail-table td {
    color: #2d3748;
}

/* ─── Sterne-Wertung ──────────────────────────────────────── */
.bbgv-star {
    font-size: 16px;
    color: #d1d5db;
    line-height: 1;
    display: inline-block;
}
.bbgv-star-filled {
    color: #f59e0b;
}
.bbgv-wertung-label {
    font-size: 11px;
    color: #9ca3af;
    margin-left: 4px;
    vertical-align: middle;
}

/* ─── Beschreibung ────────────────────────────────────────── */
.bbgv-card-description {
    font-size: 13px;
    color: #4a5568;
    line-height: 1.6;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ─── Karten-Footer ───────────────────────────────────────── */
.bbgv-card-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #edf2f7;
    font-size: 12px;
    color: #718096;
    flex-wrap: wrap;
}
.bbgv-card-author {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}
.bbgv-avatar {
    border-radius: 50%;
    vertical-align: middle;
}
.bbgv-card-date {
    white-space: nowrap;
}

/* Löschen-Link: kein Dashicon, reiner Text-Link mit Border */
.bbgv-delete-link {
    display: inline-block;
    color: #e53e3e;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #e53e3e;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.bbgv-delete-link:hover {
    background: #e53e3e;
    color: #fff;
}

/* ─── Checkbox-Gruppe (Wetter-Mehrfachauswahl) ───────────── */
.bbgv-checkbox-group {
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    padding: 10px 14px;
    background: #f7fafc;
    margin: 0;
}
.bbgv-checkbox-group legend {
    font-weight: 600;
    font-size: 13px;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 4px;
}
.bbgv-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-right: 14px;
    margin-top: 6px;
    font-size: 14px;
    color: #2d3748;
    cursor: pointer;
    font-weight: normal;
    text-transform: none;
    letter-spacing: 0;
}
.bbgv-checkbox {
    width: auto;
    margin: 0;
    cursor: pointer;
    accent-color: var(--bb-primary-color, #007cba);
}
.bbgv-checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
    margin-top: 6px;
}

/* ─── Activity-Feed Einträge ──────────────────────────────── */
.bbgv-activity-entry {
    width: 100%;
}
.bbgv-activity-title {
    margin: 0 0 4px 0;
    font-size: 15px;
    line-height: 1.4;
}
.bbgv-activity-meta-line {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: #4a5568;
    line-height: 1.4;
}
.bbgv-activity-description {
    margin: 4px 0 10px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #2d3748;
}
.bbgv-activity-entry .bbgv-meta-label {
    font-weight: 600;
    color: #2d3748;
}
.bbgv-activity-entry-PLACEHOLDER {  /* Platzhalter – wird nicht genutzt */
    width: 100%;
}
.bbgv-activity-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.bbgv-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
}
.bbgv-meta-label {
    color: #718096;
}
.bbgv-activity-description {
    font-size: 14px;
    color: #4a5568;
    margin-bottom: 12px;
    line-height: 1.6;
}

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
    .bbgv-form-row-inline {
        grid-template-columns: 1fr;
    }
    .bbgv-video-grid {
        grid-template-columns: 1fr;
    }
    .bbgv-sort-bar {
        gap: 6px;
    }
    .bbgv-video-count {
        margin-left: 0;
        width: 100%;
    }
    .bbgv-detail-table th {
        width: 50%;
    }
    .bbgv-form-actions {
        flex-direction: column;
    }
    .bbgv-btn {
        width: 100%;
        text-align: center;
    }
}
