.kitchencar-owner-schedule {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.calendar-container {
    margin: 20px 0;
}

.calendar-header {
    margin-bottom: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 4px;
}

.calendar-title {
    font-size: 1.5em;
    font-weight: bold;
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    table-layout: fixed;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.calendar-table th,
.calendar-table td {
    width: 14.28%;
    padding: 30px 3px 3px 3px; /* 上部の余白を増やして日付用に確保 */
    text-align: center;
    border: 2px solid #e0e0e0;
    height: 120px;
    vertical-align: top;
    position: relative;
    box-sizing: border-box;
    overflow: hidden; /* はみ出しを防ぐ */
}

.calendar-table th {
    background: #f5f5f5;
    font-weight: bold;
}

.calendar-table .today {
    background: #e3f2fd !important;
    font-weight: bold;
    position: relative;
    border: 3px solid #1976d2 !important;
}

/* レスポンシブ対応 */
@media screen and (max-width: 1200px) {
    .calendar-table th,
    .calendar-table td {
        height: auto; /* 高さを自動調整 */
        min-height: 100px; /* 最低限の高さを確保 */
        font-size: 0.9em;
    }
    
    .schedule-time label {
        padding: 3px 4px;
        font-size: 0.75em;
    }
}

@media screen and (max-width: 992px) {
    .calendar-table th,
    .calendar-table td {
        height: auto; /* 高さを自動調整 */
        min-height: 110px; /* 最低限の高さを確保 */
        padding: 25px 3px 3px 3px;
    }
    
    .date {
        padding: 1px 3px;
        font-size: 0.8em;
    }
    
    .schedule-time {
        margin-top: 5px;
        gap: 5px;
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: center;
    }
    
    .schedule-time label {
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 2px 5px;
        font-size: 0.75em;
        white-space: nowrap; /* テキストの折り返しを防ぐ */
    }
    
    .schedule-time input[type="checkbox"] {
        margin: 0 3px 0 0;
    }
}

@media screen and (max-width: 768px) {
    .calendar-container {
        overflow-x: auto;
    }
    
    .calendar-table {
        min-width: 600px;
    }
    
    .calendar-table th,
    .calendar-table td {
        height: auto; /* 高さを自動調整 */
        min-height: 90px; /* 最低限の高さを確保 */
        font-size: 0.8em;
    }
    
    .schedule-time {
        margin-top: 18px;
        /* スクロールバーを非表示に */
        max-height: none;
        overflow: visible;
    }
}

.calendar-table .today:after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background: #2196F3;
    border-radius: 50%;
}

.calendar-table .empty {
    background: #f9f9f9;
}

.calendar-table .has-schedule {
    background: #fff3e0;
}

.calendar-table .date {
    font-weight: bold;
    margin-bottom: 5px;
}

.date {
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    padding: 2px 5px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9em;
    text-align: right;
    z-index: 2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.schedule-time {
    margin-top: 10px;  /* 上部の余白を増やして昼のチェックボックスが切れないように */
    display: flex;
    flex-direction: column;  /* 縦並びに変更 */
    gap: 8px;               /* チェックボックス間の間隔を少し広げる */
    align-items: flex-start; /* 左揃え */
    padding: 5px 3px;        /* 上下左右の余白を調整 */
    /* スクロールバーを非表示に */
    overflow: visible;
    height: auto;
    max-height: none;
}

.schedule-time label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 4px 6px;
    margin: 0;
    background: #f8f9fa;
    border-radius: 3px;
    border: 1px solid #e0e0e0;
    font-size: 0.8em;
    transition: all 0.2s ease;
    box-sizing: border-box;
    white-space: nowrap;
}

.schedule-time input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0 3px 0 0;
}

.date {
    font-size: 1.2em;
    margin-bottom: 40px;
    font-weight: bold;
    color: #333;
}

/* チェックボックススタイル */
/* Status message styles */
/* スケジュール一覧のスタイル */
.schedule-list {
    max-width: 100%;
    margin: 0 auto;
    padding: 10px;
    box-sizing: border-box;
}

.schedule-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.schedule-date {
    background: #f5f5f5;
    padding: 10px 15px;
    font-weight: bold;
    border-bottom: 1px solid #e0e0e0;
}

.schedule-time-slots {
    padding: 10px 15px;
}

.time-slot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.time-slot:last-child {
    border-bottom: none;
}

.time-label {
    font-weight: bold;
    min-width: 50px;
    margin-right: 10px;
}

.status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.85em;
    margin-right: 10px;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-approved {
    background-color: #d4edda;
    color: #155724;
}

.status-rejected {
    background-color: #f8d7da;
    color: #721c24;
}

.status-cancelled {
    background-color: #e2e3e5;
    color: #383d41;
}

.description {
    flex: 1;
    margin: 5px 0;
    font-size: 0.9em;
    color: #555;
    word-break: break-word;
    min-width: 100%;
}

.edit-schedule {
    background: #007cba;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 5px 10px;
    font-size: 0.85em;
    cursor: pointer;
    margin-left: auto;
    white-space: nowrap;
}

.edit-schedule:hover {
    background: #006ba1;
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
    .schedule-item {
        margin: 0 -10px 15px;
        border-left: none;
        border-right: none;
        border-radius: 0;
    }
    
    .schedule-date {
        padding: 8px 10px;
    }
    
    .time-slot {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .time-label {
        margin-bottom: 5px;
    }
    
    .edit-schedule {
        margin: 5px 0 0 0;
        width: 100%;
        text-align: center;
    }
}

.status-message {
    display: inline-block;
    margin-left: 10px;
    vertical-align: middle;
    font-size: 14px;
    line-height: 1.5;
}

.status-message .success {
    color: #46b450;
    background-color: #f0f8f1;
    padding: 4px 8px;
    border-radius: 3px;
    display: inline-block;
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Form actions container */
.form-actions {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.time-slot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 4px 8px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.time-slot:hover {
    background: #f0f0f0;
}

.time-slot input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}

.time-slot.checked {
    background: #e3f2fd;
    border-color: #90caf9;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .calendar-table th,
    .calendar-table td {
        min-height: 90px;  /* 高さを少し増やして余裕を持たせる */
        height: auto;
        font-size: 0.85em;
        padding: 20px 2px 2px 2px;
    }
    
    .schedule-time {
        flex-direction: column;  /* 縦並びを維持 */
        gap: 6px;               /* チェックボックス間の間隔を広げる */
        padding: 5px 3px;        /* 上下左右の余白を調整 */
        width: 100%;
        margin-top: 8px;         /* 上部の余白を追加 */
    }
    
    .schedule-time label {
        font-size: 0.7em;
        padding: 1px 3px;
        white-space: nowrap;
        display: flex;
        align-items: center;
        width: 100%;
    }
    
    .schedule-time input[type="checkbox"] {
        margin: 0 2px 0 0;
        transform: scale(0.8);  /* チェックボックスを少し小さく */
    }
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
}

.button {
    display: inline-block;
    padding: 8px 16px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    cursor: pointer;
}

.button:hover {
    background: #005177;
}
