/* 
 * WP Boardgame Game Nights - Public Styles 
 * Phase 8: Modern Card Layout with Meeples
 */

.bgn-game-night-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #334155;
    line-height: 1.5;
}

.bgn-event-meta {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.bgn-event-meta p {
    margin-bottom: 8px !important;
    font-size: 0.95rem;
}
.bgn-event-meta p:last-child {
    margin-bottom: 0 !important;
}

/* Card Layout */
.bgn-table-card {
    display: flex;
    flex-direction: row;
    align-items: center; /* Center items vertically */
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    gap: 25px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    align-items: flex-start;
}

.bgn-table-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    transform: translateY(-2px);
}

.bgn-table-status-cancelled {
    opacity: 0.6;
    filter: grayscale(100%);
}

.bgn-table-image {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08); /* Effetto profondità come nello screen */
    margin-top: 5px;
}
.bgn-table-image svg, .bgn-table-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bgn-table-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bgn-table-title {
    margin: 0 !important;
    font-size: 1.6rem !important;
    font-weight: 700 !important;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.02em;
}

/* Badges */
.bgn-table-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.bgn-badge {
    background: #2563eb;
    color: white;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.bgn-badge svg {
    width: 15px;
    height: 15px;
}

.bgn-badge-green { 
    background: #16a34a; 
    box-shadow: 0 2px 4px rgba(22, 163, 74, 0.2);
}

.bgn-badge-status { 
    background: #64748b; 
    font-size: 0.75rem; 
    text-transform: uppercase; 
    padding: 3px 8px; 
    border-radius: 4px;
    box-shadow: none;
    letter-spacing: 0.05em;
}
.bgn-badge-status.open { background: #16a34a; }
.bgn-badge-status.full { background: #ea580c; }
.bgn-badge-status.closed { background: #dc2626; }

/* Meeples Row */
.bgn-meeples-row {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.bgn-meeple {
    width: 44px; /* Grandi come nello screen */
    height: 44px;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.2s ease;
}

/* Occupied Meeple: Blue with strong shadow to pop out */
.bgn-meeple-occupied {
    fill: #0055ff; /* Blu elettrico come referenza */
    filter: drop-shadow(2px 4px 3px rgba(0,0,0,0.3));
    cursor: default;
}
.bgn-meeple-occupied:hover { 
    transform: translateY(-4px) scale(1.05);
}

/* Empty Meeple: White/Light Gray with inner shadow effect or strong drop-shadow */
.bgn-meeple-empty {
    fill: #f8fafc;
    /* Usiamo un bordo SVG in CSS */
    stroke: #d1d5db;
    stroke-width: 1px;
    filter: drop-shadow(2px 4px 3px rgba(0,0,0,0.15));
    cursor: pointer;
}
.bgn-meeple-empty:hover {
    fill: #e0f2fe;
    stroke: #bae6fd;
    transform: translateY(-4px) scale(1.05);
    filter: drop-shadow(2px 6px 4px rgba(0,0,0,0.2));
}

/* Notes and Footer */
.bgn-table-notes {
    margin: 5px 0 0 0 !important;
    font-size: 0.95rem;
    color: #475569;
    font-style: italic;
    background: #f1f5f9;
    padding: 8px 12px;
    border-left: 3px solid #cbd5e1;
    border-radius: 4px;
}

.bgn-table-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #e2e8f0;
}

.bgn-table-actions p { 
    margin: 0 !important; 
    font-size: 0.95rem; 
    color: #64748b; 
}

/* Buttons */
.bgn-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.bgn-btn-primary {
    background: #2563eb;
    color: white;
}
.bgn-btn-primary:hover {
    background: #1d4ed8;
    color: white;
}
.bgn-btn-secondary {
    background: #e2e8f0;
    color: #475569;
}
.bgn-btn-secondary:hover {
    background: #cbd5e1;
    color: #0f172a;
}
.bgn-btn-danger {
    background: #fee2e2;
    color: #ef4444;
}
.bgn-btn-danger:hover {
    background: #f87171;
    color: white;
}

.bgn-form-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 20px;
    border-radius: 8px;
    margin-top: 15px;
}
.bgn-form-container input, .bgn-form-container select, .bgn-form-container textarea {
    width: 100%;
    margin-bottom: 12px;
    padding: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
}

@media (max-width: 600px) {
    .bgn-table-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }
    .bgn-table-title {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }
    .bgn-table-badges {
        justify-content: center;
    }
    .bgn-meeples-row {
        justify-content: center;
    }
    .bgn-table-actions {
        flex-direction: column;
        justify-content: center;
    }
}
