/* ===================================
   プログラムモーダル用CSS
   =================================== */

/* モーダル背景 */
.presentation-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* モーダルコンテンツ */
.modal-content {
    background-color: #ffffff;
    margin: 2% auto;
    padding: 0;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* モーダルヘッダー */
.modal-header {
    padding: 24px 30px;
    background: #5591af;
    color: white;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-title-section {
    flex: 1;
}

.modal-header h2 {
    margin: 0 0 12px 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.4;
    color: white;
}

.session-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
    font-size: 0.9rem;
}

/* モバイル用：セッション情報を2列レイアウトに */
@media screen and (max-width: 768px) {
    .session-info {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        align-items: start;
    }
    
    .session-info .session-date {
        grid-column: 1 / -1;
    }
}

.session-info span {
    background-color: rgba(255, 255, 255, 0.25);
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
    backdrop-filter: blur(10px);
}

.session-time-item {
    white-space: nowrap;
}

/* 閉じるボタン */
.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-left: 16px;
}

.modal-close:hover,
.modal-close:focus {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* モーダルボディ */
.modal-body {
    padding: 30px;
    overflow-y: auto;
    max-height: calc(90vh - 150px);
}

/* インタラクティブセッション通知 */
.interactive-session-notice {
    background-color: #f8f9fa;
    border-left: 3px solid #adb5bd;
    padding: 10px 14px;
    margin-bottom: 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #495057;
    font-weight: 400;
    display: flex;
    align-items: center;
}

.interactive-session-notice::before {
    content: 'ℹ️';
    font-size: 1rem;
    margin-right: 8px;
    opacity: 0.7;
}

/* 検索ボックス */
.presentation-search-box {
    position: sticky;
    top: -30px;
    background: white;
    padding: 15px 0 20px;
    margin-bottom: 20px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.presentation-search-box svg {
    color: #5591af;
    flex-shrink: 0;
    display: none; /* デフォルトで非表示 */
}

/* デスクトップのみ虫眼鏡を表示 */
@media screen and (min-width: 769px) {
    .presentation-search-box svg {
        display: block;
    }
}

.presentation-search-box input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.presentation-search-box input:focus {
    outline: none;
    border-color: #5591af;
    box-shadow: 0 0 0 3px rgba(85, 145, 175, 0.1);
}

.search-count {
    font-size: 0.9rem;
    color: #5591af;
    font-weight: 600;
    min-width: 50px;
    text-align: right;
}

/* 発表リスト */
.presentation-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 発表アイテム */
.presentation-item {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.presentation-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(135deg, #5591af 0%, #4a7a8c 100%);
}

.presentation-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateX(4px);
    border-color: #5591af;
}

/* 発表ヘッダー */
.presentation-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.presentation-id {
    font-weight: 700;
    font-size: 1.1rem;
    color: #5591af;
    background: linear-gradient(135deg, #5591af 0%, #4a7a8c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.presentation-number {
    font-size: 0.85rem;
    color: #666;
    background-color: #e0e0e0;
    padding: 3px 10px;
    border-radius: 12px;
    flex-shrink: 0;
}

/* 発表タイトル */
.presentation-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #333;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* 著者情報 */
.presentation-authors {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    padding-left: 12px;
    border-left: 3px solid #e0e0e0;
}

/* 発表情報がない場合 */
.no-presentations {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 1.1rem;
}

/* クリック可能なセッション */
.clickable-session {
    position: relative;
    transition: all 0.2s ease;
}

.clickable-session::after {
    content: 'クリックして詳細を表示';
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.clickable-session:hover::after {
    opacity: 1;
}

.clickable-session:hover {
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 85vh;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-header h2 {
        font-size: 1.2rem;
    }
    
    .session-time-item {
        font-size: 0.85rem;
    }
    
    .interactive-session-notice {
        font-size: 0.85rem;
        padding: 8px 12px;
        margin-bottom: 12px;
    }
    
    .modal-body {
        padding: 20px;
        max-height: calc(85vh - 140px);
    }
    
    .presentation-search-box {
        top: -20px;
        padding: 10px 0 15px;
    }
    
    .presentation-search-box input {
        font-size: 0.9rem;
        padding: 8px 12px;
    }
    
    .presentation-item {
        padding: 16px;
    }
    
    .presentation-title {
        font-size: 1rem;
    }
    
    .presentation-authors {
        font-size: 0.85rem;
    }
    
    .modal-close {
        width: 36px;
        height: 36px;
        margin-left: 8px;
    }
    
    .clickable-session::after {
        content: '';
        color: black;
        bottom: auto;
        top: 8px;
        right: 8px;
        left: auto;
        transform: none;
        background-color: transparent;
        padding: 0;
    }
}

@media screen and (max-width: 480px) {
    /* モーダル背景を暗くして全画面表示に */
    .presentation-modal {
        background-color: rgba(0, 0, 0, 0.95);
    }
    
    .modal-content {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
    }
    
    .modal-header {
        border-radius: 0;
        padding: 16px;
    }
    
    .modal-header h2 {
        font-size: 1.05rem;
    }
    
    .modal-body {
        max-height: calc(100vh - 140px);
    }
    
    .interactive-session-notice {
        font-size: 0.8rem;
        padding: 8px 10px;
        margin-bottom: 12px;
    }
    
    .interactive-session-notice::before {
        font-size: 1rem;
        margin-right: 6px;
    }
    
    .presentation-search-box {
        padding: 10px 0 15px;
    }
    
    .search-count {
        text-align: right;
    }
}

/* スクロールバーのスタイル */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #5591af 0%, #4a7a8c 100%);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #4a7a8c 0%, #3a5a6c 100%);
}

/* アクセシビリティ: フォーカス時のアウトライン */
.modal-close:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* プリントスタイル */
@media print {
    .presentation-modal {
        display: none !important;
    }
}
