/* SZMC Geriatrics Presentation Maker - Resources Panel Styles */

/* Resource Panel */
.resource-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    overflow-y: auto;
    transition: right 0.3s ease;
}

.resource-panel.open {
    right: 0;
}

.resource-panel-header {
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--primary-color, #1e40af) 0%, var(--primary-light, #3b82f6) 100%);
    color: white;
    z-index: 1;
}

.resource-panel-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.resource-panel-header .btn-icon {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.resource-panel-header .btn-icon:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Resource Search */
.resource-search {
    padding: 16px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.resource-search input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.resource-search input:focus {
    outline: none;
    border-color: var(--primary-color, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-buttons {
    display: flex;
    gap: 8px;
}

.search-buttons button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.search-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Resource Categories */
.resource-categories {
    padding: 16px 20px;
}

.resource-category {
    margin-bottom: 20px;
}

.resource-category h4 {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.resource-category h4 i {
    font-size: 0.9rem;
}

.resource-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.resource-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 8px;
    text-decoration: none;
    color: #334155;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.resource-link:hover {
    background: #f1f5f9;
    border-left-color: var(--resource-color, #3b82f6);
    transform: translateX(4px);
}

.resource-link i {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--resource-color, #3b82f6);
    color: white;
    border-radius: 6px;
    font-size: 0.75rem;
}

.resource-link span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Geriatric Tools Section */
.geriatric-tools-section {
    padding: 16px 20px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.geriatric-tools-section h4 {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tools-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tool-category {
    background: white;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.tool-category h5 {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color, #1e40af);
    margin-bottom: 8px;
    text-transform: capitalize;
}

.tool-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tool-link {
    display: inline-block;
    padding: 4px 10px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    text-decoration: none;
    transition: all 0.2s;
}

.tool-link:hover {
    background: #0369a1;
    color: white;
}

/* Evidence Badge */
.evidence-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 4px;
    color: white;
    margin-left: 4px;
}

/* Resources Button in Header */
.btn-resources {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Presentation Mode Styles */
.mode-ui {
    position: fixed;
    z-index: 100;
}

/* Speaker View */
.speaker-view {
    position: fixed;
    bottom: 80px;
    left: 20px;
    right: 20px;
    display: grid;
    grid-template-columns: 1fr 300px 120px;
    gap: 20px;
    background: rgba(0, 0, 0, 0.9);
    padding: 20px;
    border-radius: 12px;
    color: white;
}

.speaker-notes-panel {
    background: rgba(255, 255, 255, 0.1);
    padding: 16px;
    border-radius: 8px;
}

.speaker-notes-panel h4 {
    font-size: 0.875rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
}

.speaker-notes-content {
    font-size: 1rem;
    line-height: 1.6;
    color: #f1f5f9;
    min-height: 100px;
}

.speaker-preview {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 8px;
}

.preview-label {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.next-preview {
    background: white;
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.next-preview .mini-slide {
    transform: scale(0.2);
    transform-origin: top left;
    width: 500%;
    height: 500%;
}

.speaker-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.end-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 0.875rem;
    color: #64748b;
}

/* Overview Grid */
.overview-grid {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 60px;
    padding: 40px;
    background: #0f172a;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    overflow-y: auto;
}

.overview-slide {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.overview-slide:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.overview-slide.active {
    ring: 3px solid #3b82f6;
    box-shadow: 0 0 0 3px #3b82f6;
}

.overview-number {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 28px;
    height: 28px;
    background: #1e40af;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 1;
}

.overview-type {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 12px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
}

.overview-mini {
    aspect-ratio: 16/9;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.mini-preview {
    font-size: 0.7rem;
    color: #64748b;
    text-align: center;
}

/* Rehearsal Panel */
.rehearsal-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.85);
    padding: 16px 24px;
    border-radius: 12px;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 180px;
}

.timer-display {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.timer-display i {
    font-size: 1.5rem;
    color: #60a5fa;
}

.slide-timing {
    font-size: 0.875rem;
    color: #94a3b8;
}

.slide-timing span:last-child {
    font-weight: 600;
    color: white;
}

.progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Blank Screen */
.presentation-container.blanked {
    opacity: 0;
}

.presentation-container.blank-black {
    background: #000 !important;
}

.presentation-container.blank-white {
    background: #fff !important;
}

/* Transition Effects */
#presentation-mode[data-transition="fade"] #presentation-container.transitioning {
    opacity: 0;
    transition: opacity 0.15s ease;
}

#presentation-mode[data-transition="slide"] #presentation-container.transitioning {
    transform: translateX(100%);
    transition: transform 0.15s ease;
}

#presentation-mode[data-transition="zoom"] #presentation-container.transitioning {
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.15s ease;
}

/* Presentation Options Modal */
#presentation-options-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    align-items: center;
    justify-content: center;
}

#presentation-options-modal.active {
    display: flex;
}

.presentation-options-content {
    background: white;
    border-radius: 16px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
}

.presentation-options-content h3 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.presentation-mode-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.mode-option {
    padding: 20px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.mode-option:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.mode-option i {
    font-size: 1.5rem;
    color: #3b82f6;
    margin-bottom: 8px;
}

.mode-option h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.mode-option p {
    font-size: 0.75rem;
    color: #64748b;
}

.transition-options {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.transition-options label {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

.transition-options select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .resource-panel {
        width: 100%;
        right: -100%;
    }

    .speaker-view {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .overview-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 20px;
    }

    .rehearsal-panel {
        right: 10px;
        top: 10px;
        padding: 12px 16px;
    }

    .timer-display {
        font-size: 1.5rem;
    }
}
