/* ============================================
   MODUŁ KONFERENCJI — CSS
   ============================================ */

/* --- Statystyki na górze --- */
.conference-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e9ecef;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    flex-shrink: 0;
}

.stat-card .stat-icon.active { background: linear-gradient(135deg, #22c55e, #16a34a); }
.stat-card .stat-icon.planned { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.stat-card .stat-icon.ended { background: linear-gradient(135deg, #6b7280, #4b5563); }
.stat-card .stat-icon.total { background: linear-gradient(135deg, #2d5a27, #4a9142); }

.stat-card .stat-info h3 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
    color: #1a1f2e;
}

.stat-card .stat-info p {
    margin: 2px 0 0;
    font-size: 0.85rem;
    color: #6c757d;
}

/* --- Tabela konferencji --- */
.conferences-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.conferences-table th {
    background: linear-gradient(135deg, #f8f9fa, #eef2e8);
    padding: 12px 16px;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 600;
    color: #2d5a27;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #c5d4b8;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.conferences-table th:hover {
    background: linear-gradient(135deg, #eef2e8, #dce5d3);
}

.conferences-table th i.sort-icon {
    margin-left: 6px;
    font-size: 0.7rem;
    opacity: 0.4;
}

.conferences-table th i.sort-icon.active {
    opacity: 1;
    color: #2d5a27;
}

.conferences-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
    vertical-align: middle;
}

.conferences-table tr:hover td {
    background: #f8faf6;
}

.conferences-table tr.active-row {
    background: rgba(34, 197, 94, 0.05);
}

.conferences-table tr.active-row td {
    border-left: 3px solid #22c55e;
}

/* --- Statusy --- */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-badge.planned {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-badge.active {
    background: #dcfce7;
    color: #15803d;
    animation: pulse-active 2s infinite;
}

.status-badge.ended {
    background: #f3f4f6;
    color: #4b5563;
}

.status-badge.cancelled {
    background: #fee2e2;
    color: #dc2626;
}

@keyframes pulse-active {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.3); }
    50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

.status-badge .pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* --- Typ konferencji --- */
.type-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: #4b5563;
}

.type-badge i {
    color: #2d5a27;
}

/* --- Przyciski akcji w tabeli --- */
.action-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
}

.action-buttons .btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.action-buttons .btn-join {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
}
.action-buttons .btn-join:hover { transform: scale(1.1); box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4); }

.action-buttons .btn-edit {
    background: #f0f9ff;
    color: #3b82f6;
}
.action-buttons .btn-edit:hover { background: #dbeafe; }

.action-buttons .btn-invite {
    background: #fef3c7;
    color: #d97706;
}
.action-buttons .btn-invite:hover { background: #fde68a; }

.action-buttons .btn-delete {
    background: #fef2f2;
    color: #ef4444;
}
.action-buttons .btn-delete:hover { background: #fee2e2; }

.action-buttons .btn-copy {
    background: #f3f4f6;
    color: #6b7280;
}
.action-buttons .btn-copy:hover { background: #e5e7eb; }

/* --- Modal tworzenia konferencji --- */
.conference-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.conference-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.conference-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.conference-form .form-group.full-width {
    grid-column: 1 / -1;
}

.conference-form label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
}

.conference-form label i {
    margin-right: 6px;
    color: #2d5a27;
}

.conference-form input,
.conference-form select,
.conference-form textarea {
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.conference-form input:focus,
.conference-form select:focus,
.conference-form textarea:focus {
    outline: none;
    border-color: #2d5a27;
    box-shadow: 0 0 0 3px rgba(45, 90, 39, 0.15);
}

.conference-form textarea {
    resize: vertical;
    min-height: 80px;
}

/* Toggle switch */
.toggle-switch-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    border-radius: 24px;
    transition: 0.3s;
}

.toggle-slider:before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #2d5a27;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* --- Uczestnicy — wybór z listy --- */
.participant-select-area {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.participant-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 36px;
    padding: 8px;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
}

.participant-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #2d5a27, #4a9142);
    color: white;
    border-radius: 16px;
    font-size: 0.8rem;
    animation: tagPopIn 0.25s ease-out;
}

.participant-chip .remove-chip {
    cursor: pointer;
    opacity: 0.8;
    font-size: 0.75rem;
}

.participant-chip .remove-chip:hover {
    opacity: 1;
}

.participant-list-dropdown {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
}

.participant-list-dropdown .participant-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid #f0f0f0;
}

.participant-list-dropdown .participant-option:hover {
    background: #f0fdf4;
}

.participant-list-dropdown .participant-option.selected {
    background: #dcfce7;
}

.participant-list-dropdown .participant-option input[type="checkbox"] {
    accent-color: #2d5a27;
}

/* --- Modal zaproszenia gościa --- */
.guest-invite-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.invite-link-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    margin-top: 12px;
}

.invite-link-display input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.85rem;
    color: #15803d;
    font-family: monospace;
}

.invite-link-display button {
    padding: 6px 12px;
    background: #2d5a27;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
}

/* --- Empty state --- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 1.1rem;
    color: #6b7280;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* --- Konfiguracja Daily.co banner --- */
.config-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #f59e0b;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #92400e;
}

.config-banner i {
    font-size: 1.3rem;
    color: #f59e0b;
}

.config-banner a, .config-banner button {
    color: #92400e;
    font-weight: 600;
    text-decoration: underline;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

/* --- Szczegóły konferencji modal --- */
.conference-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-item .detail-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    font-weight: 600;
}

.detail-item .detail-value {
    font-size: 0.95rem;
    color: #1f2937;
    font-weight: 500;
}

/* --- Tabs w szczegółach --- */
.detail-tabs {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
    margin: 20px 0 16px;
    gap: 0;
}

.detail-tabs .tab-btn {
    padding: 10px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: #6b7280;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.detail-tabs .tab-btn.active {
    color: #2d5a27;
    border-bottom-color: #2d5a27;
}

.detail-tabs .tab-btn:hover:not(.active) {
    color: #374151;
    background: #f9fafb;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeInUp 0.3s ease-out;
}

/* --- Nagrania lista --- */
.recording-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid #e5e7eb;
}

.recording-item .recording-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.recording-item .recording-info i {
    font-size: 1.5rem;
    color: #ef4444;
}

.recording-item .recording-meta {
    font-size: 0.8rem;
    color: #6b7280;
}

.recording-item .recording-actions {
    display: flex;
    gap: 6px;
}

/* --- Setup wizard modal --- */
.setup-wizard {
    text-align: center;
    padding: 20px;
}

.setup-wizard .step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #2d5a27, #4a9142);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    margin-bottom: 12px;
}

.setup-wizard .step-instructions {
    text-align: left;
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    margin: 16px 0;
    font-size: 0.9rem;
    line-height: 1.8;
}

.setup-wizard .step-instructions ol {
    padding-left: 20px;
}

.setup-wizard .api-key-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    font-family: monospace;
    text-align: center;
    margin: 16px 0;
}

.setup-wizard .api-key-input:focus {
    outline: none;
    border-color: #2d5a27;
    box-shadow: 0 0 0 3px rgba(45, 90, 39, 0.15);
}

/* --- Responsywność --- */
@media (max-width: 768px) {
    .conference-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .conference-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .conference-details-grid {
        grid-template-columns: 1fr;
    }
    
    .conferences-table {
        font-size: 0.8rem;
    }
    
    .conferences-table th,
    .conferences-table td {
        padding: 8px 10px;
    }
    
    .action-buttons {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .conference-stats {
        grid-template-columns: 1fr;
    }
}

/* --- Pulsujący przycisk nagrywania --- */
.recording-pulse {
    animation: recordPulse 1.5s ease-in-out infinite;
}

@keyframes recordPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
    50% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
}

/* --- Lista nagrań w odtwarzaczu --- */
.recording-item:hover {
    background: #f3f4f6 !important;
}
.recording-item.active {
    background: #ecfdf5 !important;
    border-left: 3px solid #2d5a27;
}

/* --- Przycisk Play w tabeli --- */
.btn-play:hover {
    color: #16a34a !important;
    transform: scale(1.15);
}
