/* A.I.KEN ポータル カスタムスタイル */

/* カレンダー用スタイル */
.calendar-day {
    min-height: 120px;
    position: relative;
}

.calendar-day:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* マルチデイイベント用スタイル */
.multi-day-event {
    position: relative;
    margin-bottom: 2px;
    padding: 2px 6px;
    font-size: 11px;
    line-height: 1.2;
    cursor: pointer;
    transition: all 0.1s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.multi-day-event:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

/* マルチデイイベントの開始日 */
.multi-day-start {
    border-radius: 4px 0 0 4px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

/* マルチデイイベントの中間日 */
.multi-day-middle {
    border-radius: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0.8;
}

/* マルチデイイベントの終了日 */
.multi-day-end {
    border-radius: 0 4px 4px 0;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0.8;
}

/* 単日イベント（継続マーク）*/
.event-continuation {
    text-align: center;
    font-weight: bold;
    letter-spacing: 2px;
}

/* イベント付箋スタイル */
.event-sticky {
    position: relative;
    margin-bottom: 2px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.event-sticky:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* 付箋の角を折った効果 */
.event-sticky::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    background: linear-gradient(-45deg, transparent 50%, rgba(0,0,0,0.1) 50%);
    border-radius: 0 4px 0 0;
}

/* サイドバーのスタイル調整 */
.nav-button {
    transition: all 0.2s ease;
}

.nav-button:hover {
    transform: translateX(2px);
}

/* モーダルアニメーション */
.modal-enter {
    animation: modalEnter 0.2s ease-out;
}

@keyframes modalEnter {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* フォーム要素のスタイル調整 */
.form-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ダッシュボードカードのホバー効果 */
.dashboard-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* チェックリストのスタイル */
.checklist-item {
    margin-right: 8px;
}

.checklist-item:checked + .checklist-text {
    text-decoration: line-through;
    opacity: 0.6;
}

/* カレンダーグリッドの調整 */
.calendar-grid {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.calendar-grid > div {
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.calendar-grid > div:nth-child(7n) {
    border-right: none;
}

.calendar-days > div:nth-child(n+36) {
    border-bottom: none;
}

/* レスポンシブ調整 */
@media (max-width: 768px) {
    .calendar-day {
        min-height: 80px;
        font-size: 12px;
    }
    
    .event-sticky {
        font-size: 10px;
        padding: 1px 4px;
    }
    
    /* モバイル時はサイドバーを隠す */
    nav {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    nav.mobile-open {
        transform: translateX(0);
    }
    
    main {
        margin-left: 0;
    }
}

/* ツールチップスタイル */
.tooltip {
    position: relative;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.tooltip:hover::before {
    opacity: 1;
}

/* カラーピッカーのスタイル */
.color-picker-button {
    transition: all 0.1s ease;
}

.color-picker-button:hover {
    transform: scale(1.1);
}

/* スクロールバーのカスタマイズ */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* イベント詳細モーダルのスタイル */
.event-modal .participants-list {
    max-height: 120px;
    overflow-y: auto;
}

/* ローディングアニメーション */
.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 成功・エラーメッセージのスタイル */
.message-success {
    background-color: #10b981;
    color: white;
    padding: 12px 16px;
    border-radius: 6px;
    margin: 8px 0;
}

.message-error {
    background-color: #ef4444;
    color: white;
    padding: 12px 16px;
    border-radius: 6px;
    margin: 8px 0;
}

/* アニメーション用クラス */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { 
        transform: translateY(20px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}