/**
 * セミナーカレンダー＆予約システムのスタイル
 */

/* ========================================
   セミナーカレンダー
   ======================================== */

.seminar-calendar-container {
    background: linear-gradient(135deg, #F5F5F5, #FFFFFF);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(92, 107, 192, 0.15);
    border: 2px solid #B39DDB;
}

#seminar-calendar {
    max-width: 800px;
    margin: 0 auto;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.calendar-header h3 {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #FFB6D9, #89CFF0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.calendar-nav {
    background: linear-gradient(135deg, #9C27B0, #E91E63);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(156, 39, 176, 0.3);
}

.calendar-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(156, 39, 176, 0.5), 0 0 20px rgba(233, 30, 99, 0.3);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.weekday {
    text-align: center;
    font-weight: 600;
    color: var(--text-gray);
    padding: 10px;
    font-size: 14px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

/* タッチデバイス対応：タップ可能領域を確保 */
@media (hover: none) and (pointer: coarse) {
    .calendar-day.has-seminar {
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(156, 39, 176, 0.2);
        touch-action: manipulation;
    }
    
    .calendar-day.has-seminar:active {
        transform: scale(0.98);
        background: linear-gradient(135deg, #E1BEE7, #CE93D8);
    }
}

.calendar-day {
    min-height: 120px;
    border: 2px solid #E1BEE7;
    border-radius: 12px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    position: relative;
    transition: all 0.3s ease;
    background: white;
    color: var(--text-gray);
    overflow: visible; /* イベントが切れないように */
}

.calendar-day.empty {
    border: none;
    background: transparent;
}

.calendar-day.has-seminar {
    border-color: #9C27B0;
    background: linear-gradient(135deg, #F3E5F5, #E1BEE7);
    cursor: pointer;
    box-shadow: 0 0 15px rgba(156, 39, 176, 0.3);
}

.calendar-day.has-seminar:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(156, 39, 176, 0.4), 0 0 30px rgba(255, 215, 0, 0.2);
    border-color: #FFD700;
}

.calendar-day.today {
    border-color: #FFD700;
    border-width: 3px;
    background: linear-gradient(135deg, #FFFDE7, #FFF9C4);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.day-number {
    font-size: 17px;
    font-weight: 800;
    color: #5C6BC0;
    margin-bottom: 6px;
    width: 100%;
    text-align: center;
    text-shadow: 0 1px 2px rgba(92, 107, 192, 0.2);
}

/* イベントタイトル表示 */
.event-title {
    width: 100%;
    background: linear-gradient(135deg, #9C27B0, #E91E63);
    color: white;
    font-size: 11px;
    padding: 5px 7px;
    border-radius: 6px;
    margin-top: 3px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    box-shadow: 0 2px 8px rgba(156, 39, 176, 0.4);
    transition: all 0.2s ease;
    min-height: 32px; /* 最小高さを確保 */
    border: 1px solid rgba(255, 255, 255, 0.3); /* 境界線を追加 */
}

.event-title:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(156, 39, 176, 0.4);
}

.event-time {
    font-size: 10px;
    font-weight: 600;
    opacity: 0.9;
    flex-shrink: 0; /* 時間が省略されないように */
}

.event-name {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word; /* 長い単語も折り返す */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); /* テキストに影を追加して読みやすく */
}

.seminar-dot {
    position: absolute;
    bottom: 4px;
    background: linear-gradient(135deg, #9C27B0, #E91E63);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(156, 39, 176, 0.4);
}

/* カレンダー下の説明 */
.calendar-legend {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
    font-size: 14px;
}

.calendar-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-dot.seminar {
    background: linear-gradient(135deg, #9C27B0, #E91E63);
    box-shadow: 0 0 8px rgba(156, 39, 176, 0.4);
}

.legend-dot.today {
    background: #FFD700;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

/* ========================================
   今週のおすすめセミナー
   ======================================== */

.seminar-highlights-new {
    margin-top: 40px;
}

.seminar-highlights-new h3 {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #FFB6D9, #89CFF0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.seminar-highlights-new h3 i {
    color: #FFD700;
    filter: drop-shadow(0 0 10px #FFD700);
}

.seminar-card {
    background: var(--white);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    border: 2px solid #B39DDB;
    transition: all 0.3s ease;
    display: flex;
    gap: 20px;
    align-items: center;
    box-shadow: 0 8px 25px rgba(92, 107, 192, 0.15);
}

.seminar-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(92, 107, 192, 0.25), 0 0 30px rgba(255, 215, 0, 0.2);
    border-color: #FFD700;
}

.seminar-card-date {
    flex-shrink: 0;
    text-align: center;
    background: linear-gradient(135deg, #9C27B0, #E91E63);
    color: white;
    padding: 15px;
    border-radius: 12px;
    min-width: 80px;
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.3);
}

.seminar-card-date .day {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

.seminar-card-date .month {
    font-size: 14px;
    font-weight: 600;
    margin-top: 5px;
    opacity: 0.9;
}

.seminar-card-info {
    flex: 1;
}

.seminar-card-info h4 {
    font-size: 20px;
    font-weight: 700;
    color: #5C6BC0;
    margin-bottom: 10px;
}

.seminar-card-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
    color: var(--text-gray);
    font-size: 14px;
}

.seminar-card-meta i {
    margin-right: 5px;
    color: #9C27B0;
}

.seminar-card-badges {
    display: flex;
    gap: 10px;
    align-items: center;
}

.seminar-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-free {
    background: linear-gradient(135deg, #E8EAF6, #E3F2FD);
    color: #5C6BC0;
    border: 1px solid #9C27B0;
}

.badge-premium {
    background: linear-gradient(135deg, #FFD700, #FFC107);
    color: #1a1a2e;
}

.badge-vip {
    background: linear-gradient(135deg, #E91E63, #9C27B0);
    color: var(--white);
}

.remaining-seats {
    font-size: 13px;
    color: var(--text-gray);
}

.remaining-seats.urgent {
    color: #D32F2F;
    font-weight: 600;
}

.seminar-card-actions {
    display: flex;
    gap: 10px;
}

.btn-reserve {
    background: linear-gradient(135deg, #9C27B0, #E91E63);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.3);
}

.btn-reserve:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(156, 39, 176, 0.5), 0 0 30px rgba(233, 30, 99, 0.3);
}

.btn-reserve i {
    font-size: 14px;
}

.btn-detail {
    background: var(--white);
    color: #5C6BC0;
    border: 2px solid #9C27B0;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-detail:hover {
    background: #F5F5F5;
    color: #9C27B0;
    box-shadow: 0 4px 15px rgba(92, 107, 192, 0.3);
}

/* ========================================
   予約モーダル
   ======================================== */

.reservation-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.reservation-modal.show {
    opacity: 1;
}

/* Googleカレンダーイベントモーダル */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--primary-pink);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    z-index: 1;
}

.modal-close:hover {
    background: var(--secondary-purple);
    transform: rotate(90deg);
}

.event-card {
    background: linear-gradient(135deg, #fff5f8, #ffffff);
    border-left: 4px solid var(--primary-pink);
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.event-card:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(255, 107, 157, 0.2);
}

.event-card h3 {
    color: var(--primary-pink);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.event-card p {
    margin-bottom: 8px;
    color: var(--text-gray);
    line-height: 1.6;
}

.event-card i {
    color: var(--primary-pink);
    margin-right: 8px;
}

.reservation-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.reservation-modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

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

.reservation-modal-header {
    background: linear-gradient(135deg, #FF6B9D, #C77DFF);
    color: white;
    padding: 25px 30px;
    border-radius: 20px 20px 0 0;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.reservation-modal-header i {
    font-size: 24px;
}

.reservation-modal-header h3 {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.reservation-modal-body {
    padding: 30px;
}

.reservation-info {
    background: linear-gradient(135deg, #FFF5F8, #FFFFFF);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-pink);
}

.reservation-info h4 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.reservation-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-gray);
    margin-bottom: 8px;
    font-size: 15px;
}

.reservation-info p i {
    color: var(--primary-pink);
    width: 20px;
}

.reservation-notes {
    background: #F0F8FF;
    padding: 15px;
    border-radius: 12px;
    border-left: 4px solid #2196F3;
}

.reservation-notes p {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #1565C0;
    font-size: 13px;
    margin-bottom: 10px;
}

.reservation-notes p:last-child {
    margin-bottom: 0;
}

.reservation-notes i {
    margin-top: 2px;
    flex-shrink: 0;
}

.reservation-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #F0F0F0;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.btn-cancel {
    background: #F5F5F5;
    color: var(--text-gray);
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background: #E0E0E0;
}

.btn-reserve-confirm {
    background: linear-gradient(135deg, #FF6B9D, #C77DFF);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-reserve-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 157, 0.4);
}

/* ========================================
   日付別セミナー表示モーダル
   ======================================== */

.date-seminars-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.date-seminars-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.date-seminars-modal .modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.date-seminars-modal .modal-header {
    background: linear-gradient(135deg, #FF6B9D, #C77DFF);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.date-seminars-modal .modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.date-seminars-modal .modal-header button {
    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;
}

.date-seminars-modal .modal-body {
    padding: 20px;
    overflow-y: auto;
}

.seminar-item-modal {
    background: white;
    border: 2px solid #F0F0F0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
    align-items: center;
    transition: all 0.3s ease;
}

.seminar-item-modal:hover {
    border-color: var(--primary-pink);
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.1);
}

.seminar-time {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-pink);
    white-space: nowrap;
}

.seminar-details {
    flex: 1;
}

.seminar-details h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.btn-reserve-small {
    background: linear-gradient(135deg, #FF6B9D, #C77DFF);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-reserve-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 107, 157, 0.3);
}

/* ========================================
   レスポンシブ対応
   ======================================== */

@media (max-width: 768px) {
    .seminar-calendar-container {
        padding: 15px;
    }
    
    .calendar-header h3 {
        font-size: 18px;
    }
    
    .calendar-nav {
        width: 36px;
        height: 36px;
    }
    
    .weekday {
        font-size: 11px;
        padding: 5px 2px;
    }
    
    .calendar-days {
        gap: 5px;
    }
    
    .calendar-day {
        padding: 6px 4px;
        min-height: 110px; /* さらに増加: 90px → 110px */
    }
    
    .day-number {
        font-size: 15px; /* 14px → 15px */
        margin-bottom: 4px;
        font-weight: 800; /* 太字を強化 */
    }
    
    .event-title {
        font-size: 11px; /* 10px → 11px */
        padding: 5px 6px; /* さらに増加 */
        margin-top: 4px;
        min-height: 32px; /* 最小高さを確保 */
    }
    
    .event-time {
        font-size: 10px; /* 9px → 10px */
        display: block; /* 時間を確実に表示 */
        font-weight: 700; /* 太字で強調 */
    }
    
    .event-name {
        font-size: 11px; /* 10px → 11px */
        -webkit-line-clamp: 2; /* 2行表示 */
        line-height: 1.4; /* 行間を少し広げる */
        font-weight: 600; /* 太字で読みやすく */
    }
    
    .seminar-dot {
        width: 18px; /* 16px → 18px */
        height: 18px;
        font-size: 10px; /* 9px → 10px */
    }
    
    .seminar-card {
        flex-direction: column;
        text-align: center;
    }
    
    .seminar-card-date {
        width: 100%;
    }
    
    .seminar-card-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .seminar-card-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-reserve,
    .btn-detail {
        width: 100%;
        justify-content: center;
    }
    
    .reservation-modal-content {
        width: 95%;
    }
    
    .reservation-modal-header,
    .reservation-modal-body,
    .reservation-modal-footer {
        padding: 20px;
    }
    
    .reservation-modal-footer {
        flex-direction: column;
    }
    
    .btn-cancel,
    .btn-reserve-confirm {
        width: 100%;
        justify-content: center;
    }
}

/* 小型スマホ対応（576px以下） */
@media (max-width: 576px) {
    .seminar-calendar-container {
        padding: 10px;
        border-radius: 15px;
    }
    
    #seminar-calendar {
        max-width: 100%;
    }
    
    .calendar-header h3 {
        font-size: 16px;
    }
    
    .calendar-nav {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .weekday {
        font-size: 10px;
        padding: 4px 1px;
    }
    
    .calendar-days {
        gap: 4px;
    }
    
    .calendar-day {
        padding: 4px 2px;
        min-height: 85px;
        border-width: 1.5px;
    }
    
    .day-number {
        font-size: 13px;
        margin-bottom: 2px;
    }
    
    .event-title {
        font-size: 9px;
        padding: 3px 4px;
        margin-top: 2px;
        border-radius: 3px;
    }
    
    .event-time {
        font-size: 8px;
    }
    
    .event-name {
        font-size: 9px;
        -webkit-line-clamp: 2;
        line-height: 1.2;
    }
    
    .calendar-legend {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
        padding: 0 10px;
    }
    
    .calendar-legend-item {
        font-size: 13px;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px 15px;
        max-height: 85vh;
    }
    
    .modal-close {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .event-card {
        padding: 15px;
    }
    
    .event-card h3 {
        font-size: 1.1rem;
    }
    
    .event-card p {
        font-size: 14px;
    }
}
