/**
 * 体験日カレンダー CSS
 * ファイル名: css/experience-date.css
 */

/* 入力フィールド */
.experience-date-field {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.experience-date-field:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.experience-date-field.wpcf7-not-valid {
    border-color: #dc3232;
}

/* カレンダーコンテナ */
.experience-calendar {
    position: absolute;
    z-index: 1000;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    margin-top: 4px;
    min-width: 320px;
    display: none;
}

/* カレンダーヘッダー */
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    border-radius: 8px 8px 0 0;
}

.calendar-header .month-year {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.calendar-header button {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.calendar-header button:hover {
    background-color: #e9ecef;
    color: #333;
}

/* カレンダーグリッド */
.calendar-grid {
    padding: 16px;
}

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

.weekday {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    padding: 8px 4px;
}

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

/* カレンダーの日付 */
.calendar-day {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    border-radius: 6px;
    font-size: 14px;
    cursor: default;
    transition: all 0.2s ease;
}

.calendar-day span {
    position: relative;
    z-index: 1;
}

/* 他の月の日付 */
.calendar-day.other-month {
    color: #ccc;
}

/* 他の月の選択不可日付（より濃いグレー） */
.calendar-day.other-month.disabled {
    color: #666;
    background-color: #e0e0e0;
}

/* 過去の日付 */
.calendar-day.past-date {
    color: #ccc;
    background-color: #f8f9fa;
    cursor: not-allowed;
}

/* 選択不可の日付（月・水以外、祝日） - 横棒なし */
.calendar-day.disabled {
    color: #999;
    background-color: #f5f5f5;
    cursor: not-allowed;
    position: relative;
}

/* 祝日の特別スタイル */
.calendar-day.holiday {
    background-color: #ffe6e6;
    color: #cc0000;
}

.calendar-day.holiday.disabled {
    background-color: #f0f0f0;
    color: #999;
}

/* 選択可能な日付 */
.calendar-day.selectable {
    background-color: #e7f3ff;
    color: #007cba;
    cursor: pointer;
    font-weight: 500;
}

.calendar-day.selectable:hover {
    background-color: #cce7ff;
    transform: scale(1.05);
}

/* 選択済みの日付 */
.calendar-day.selected {
    background-color: #007cba;
    color: #fff;
    font-weight: 600;
}

.calendar-day.selected:hover {
    background-color: #005a87;
    transform: scale(1.05);
}

/* 月曜日・水曜日のハイライト */
.calendar-day.selectable::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background-color: #007cba;
    border-radius: 50%;
}

.calendar-day.selected::after {
    background-color: #fff;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .experience-calendar {
        min-width: 280px;
        margin-left: -10px;
        margin-right: -10px;
    }
    
    .calendar-header {
        padding: 12px;
    }
    
    .calendar-header .month-year {
        font-size: 16px;
    }
    
    .calendar-grid {
        padding: 12px;
    }
    
    .calendar-day {
        height: 36px;
        font-size: 13px;
    }
}

/* バリデーションエラー時のスタイル */
.wpcf7-not-valid-tip {
    color: #dc3232;
    font-size: 14px;
    margin-top: 8px;
    display: block;
}

/* アクセシビリティ */
.calendar-day:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* 祝日のツールチップ - ::after を使用 */
.calendar-day.holiday:hover::after {
    content: "祝日";
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 10;
}

/* 選択不可の日付のツールチップ - ::after を使用 */
.calendar-day.disabled:not(.holiday):hover::after {
    content: "選択不可";
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #666;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 10;
}