/**
 * VIXMA Outline Konspekt Styles
 * Drag & Drop karty w kroku 3
 * 
 * @version 1.0.0
 * @date 2026-01-27
 */

/* ============================================
   LAYOUT KONSPEKTU
   ============================================ */

.konspekt-layout {
    max-width: 800px;
    margin: 0 auto;
}

.konspekt-header {
    text-align: center;
    margin-bottom: 24px;
}

.konspekt-header h2 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
}

.konspekt-header .subtitle {
    color: #64748b;
    font-size: 16px;
}

/* ============================================
   PANEL OUTLINE
   ============================================ */

.gamma-outline-panel {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.gamma-outline-panel-centered {
    max-width: 700px;
    margin: 0 auto;
}

.outline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
}

.outline-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.outline-counter {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

/* ============================================
   FOMO TIMER TOGGLE
   ============================================ */

.fomo-timer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-bottom: 1px solid #fcd34d;
}

.fomo-icon {
    font-size: 24px;
}

.fomo-text {
    flex: 1;
}

.fomo-text strong {
    display: block;
    color: #92400e;
    font-size: 14px;
}

.fomo-text p {
    margin: 2px 0 0;
    font-size: 12px;
    color: #a16207;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #cbd5e1;
    border-radius: 26px;
    transition: 0.3s;
}

.toggle-slider:before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

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

/* ============================================
   KARTY OUTLINE
   ============================================ */

.outline-cards {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 500px;
    overflow-y: auto;
}

.outline-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: default;
    transition: all 0.2s ease;
    position: relative;
}

.outline-card:hover {
    border-color: #6366f1;
    background: #f1f5f9;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

/* Drag Handle */
.card-drag-handle {
    cursor: grab;
    color: #94a3b8;
    font-size: 16px;
    padding: 4px;
    user-select: none;
    transition: color 0.2s;
    flex-shrink: 0;
}

.card-drag-handle:hover {
    color: #6366f1;
}

.card-drag-handle:active {
    cursor: grabbing;
}

/* Card Number */
.card-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
    flex-shrink: 0;
}

/* Card Content */
.card-content {
    flex: 1;
    min-width: 0;
}

.card-content strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.card-content p,
.card-content ul,
.card-content ol {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}

.card-content ul,
.card-content ol {
    padding-left: 18px;
}

.card-content li {
    margin-bottom: 2px;
}

/* Card Actions */
.card-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.outline-card:hover .card-actions {
    opacity: 1;
}

.card-edit-btn,
.card-delete-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-edit-btn:hover {
    background: #dbeafe;
}

.card-delete-btn:hover {
    background: #fee2e2;
}

/* ============================================
   DRAG & DROP STATES
   ============================================ */

.outline-card-ghost {
    background: #ddd6fe !important;
    border-color: #8b5cf6 !important;
    border-style: dashed !important;
    opacity: 0.7;
}

.outline-card-chosen {
    background: #ede9fe !important;
    border-color: #8b5cf6 !important;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3) !important;
    transform: scale(1.02);
}

.outline-card-drag {
    opacity: 0.9;
}

body.is-dragging {
    cursor: grabbing !important;
}

body.is-dragging * {
    cursor: grabbing !important;
}

/* ============================================
   PRZYCISK DODAWANIA
   ============================================ */

.add-card-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 32px);
    margin: 0 16px 16px;
    padding: 14px;
    background: transparent;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.add-card-btn:hover {
    border-color: #6366f1;
    color: #6366f1;
    background: #f8fafc;
}

.add-card-btn span {
    font-size: 20px;
    font-weight: 300;
}

/* ============================================
   AKCJE KONSPEKTU
   ============================================ */

.konspekt-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 640px) {
    .konspekt-layout {
        padding: 0 12px;
    }
    
    .outline-cards {
        max-height: 400px;
    }
    
    .outline-card {
        padding: 12px;
    }
    
    .card-actions {
        opacity: 1;
    }
    
    .konspekt-actions {
        flex-direction: column;
    }
    
    .konspekt-actions .btn {
        width: 100%;
    }
}

/* ============================================
   SCROLLBAR
   ============================================ */

.outline-cards::-webkit-scrollbar {
    width: 6px;
}

.outline-cards::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.outline-cards::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.outline-cards::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
