/* WordPress用 介護ケアマネージャーシフト管理システム CSS */

/* 基本リセット */
.care-manager-frontend * {
    box-sizing: border-box;
}

.care-manager-frontend {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 100%;
    margin: 0 auto;
}

/* ヘッダー */
.care-header {
    background: linear-gradient(135deg, #2c5aa0, #3b82f6);
    color: white;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    margin-bottom: 20px;
}

.care-header h1 {
    margin: 0 0 10px 0;
    font-size: 24px;
}

.care-header p {
    margin: 0;
    opacity: 0.9;
}

/* ナビゲーションタブ */
.care-nav-tabs {
    background: white;
    border-bottom: 2px solid #ddd;
    padding: 0;
    display: flex;
    overflow-x: auto;
    margin-bottom: 20px;
    border-radius: 8px 8px 0 0;
}

.care-nav-tabs .nav-tab {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    transition: all 0.3s ease;
    background: none;
    border: none;
    font-size: 14px;
}

.care-nav-tabs .nav-tab:hover {
    background-color: #f8f9fa;
}

.care-nav-tabs .nav-tab.active {
    border-bottom-color: #2c5aa0;
    background-color: #e3f2fd;
    color: #2c5aa0;
    font-weight: bold;
}

/* コンテナ */
.care-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 30px;
}

/* セクション */
.care-content-section {
    display: none;
}

.care-content-section.active {
    display: block;
}

.care-content-section h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c5aa0;
    border-bottom: 2px solid #e3f2fd;
    padding-bottom: 10px;
}

/* フォーム */
.care-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.care-form-group {
    flex: 1;
    min-width: 200px;
}

.care-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.care-form-group input,
.care-form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.care-form-group input:focus,
.care-form-group select:focus {
    outline: none;
    border-color: #2c5aa0;
    box-shadow: 0 0 0 2px rgba(44, 90, 160, 0.2);
}

/* ボタン */
.care-btn {
    background: linear-gradient(135deg, #2c5aa0, #3b82f6);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 5px 0;
}

.care-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.3);
}

.care-btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.care-btn-success {
    background: linear-gradient(135deg, #28a745, #218838);
}

/* 月ナビゲーション */
.care-month-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.care-month-nav h2 {
    margin: 0;
    color: #2c5aa0;
}

/* タブ */
.care-month-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 2px solid #ddd;
}

.care-tab-btn {
    padding: 10px 20px;
    border: none;
    background: #f5f5f5;
    cursor: pointer;
    border-radius: 5px 5px 0 0;
    transition: all 0.3s ease;
}

.care-tab-btn.active {
    background: #2c5aa0;
    color: white;
}

.care-tab-btn:hover:not(.active) {
    background: #e0e0e0;
}

/* 凡例 */
.care-legend {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    font-size: 12px;
}

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

.legend-color {
    width: 15px;
    height: 15px;
    border-radius: 3px;
}

/* 個人色設定 */
.miyamoto { background-color: #fce4ec; }
.matsushita { background-color: #fff3e0; }
.mizuno { background-color: #f3e5f5; }
.furumura { background-color: #e8f5e8; }
.kadowaki { background-color: #e3f2fd; }
.ukita { background-color: #fff9c4; }
.kunimitsu { background-color: #ffebee; }

/* スケジュール種別色 */
.regular-schedule { background-color: #333; color: white; }
.temporary-schedule { background-color: #2196f3; color: white; }
.complete-off { background-color: #424242; color: white; }
.tentative { background-color: #757575; color: white; }
.important { color: #d32f2f; font-weight: bold; }
.communication { color: #1976d2; }
.adjusting { color: #388e3c; }

/* シフト表 */
.care-shift-container {
    overflow-x: auto;
    margin-top: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.care-shift-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 2000px;
}

.care-shift-table th {
    background: #2c5aa0;
    color: white;
    padding: 12px 8px;
    text-align: center;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 10;
    font-size: 12px;
    min-width: 200px;
}

.care-shift-table .time-header {
    background: #1a365d;
    width: 80px;
    min-width: 80px;
}

.care-shift-table td {
    border: 1px solid #ddd;
    padding: 4px;
    vertical-align: top;
    height: 60px;
    font-size: 11px;
    line-height: 1.3;
}

.care-shift-table .time-cell {
    background: #f8f9fa;
    text-align: center;
    font-weight: bold;
    width: 80px;
    min-width: 80px;
}

.schedule-entry {
    margin-bottom: 2px;
    padding: 2px;
    border-radius: 2px;
    font-size: 10px;
    line-height: 1.2;
}

/* カレンダー */
.care-calendar-container {
    overflow-x: auto;
    margin-top: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.care-calendar-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 2000px;
}

.care-calendar-table th {
    background: #2c5aa0;
    color: white;
    padding: 8px 4px;
    text-align: center;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 10;
    font-size: 12px;
    min-width: 60px;
    max-width: 80px;
}

.care-calendar-table .time-header {
    background: #1a365d;
    width: 100px;
    min-width: 100px;
}

.care-calendar-table td {
    border: 1px solid #ddd;
    padding: 2px;
    vertical-align: top;
    height: 60px;
    font-size: 10px;
    line-height: 1.2;
    min-width: 60px;
    max-width: 80px;
}

.care-calendar-table .time-cell {
    background: #f8f9fa;
    text-align: center;
    font-weight: bold;
    width: 100px;
    min-width: 100px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.care-calendar-table .weekend {
    background: #e3f2fd;
}

.care-calendar-table .holiday {
    background: #ffebee;
}

/* スケジュール項目（ドラッグ対応） */
.schedule-item {
    cursor: move;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 2px 0;
    padding: 3px;
    transition: all 0.2s ease;
    user-select: none;
}

.schedule-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transform: scale(1.02);
}

.schedule-item.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.calendar-cell.drop-target {
    background-color: #e8f5e8 !important;
    border: 2px dashed #4caf50 !important;
}

.calendar-entry {
    margin-bottom: 2px;
    padding: 1px 2px;
    border-radius: 2px;
    font-size: 10px;
    line-height: 1.1;
}

/* カード */
.care-staff-card, .care-client-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.care-staff-card h3, .care-client-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 労働時間テーブル */
.care-work-hours-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.care-work-hours-table th,
.care-work-hours-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.care-work-hours-table th {
    background-color: #f8f9fa;
    font-weight: bold;
}

/* 給与計算表 */
.care-salary-detail-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 12px;
}

.care-salary-detail-table th,
.care-salary-detail-table td {
    padding: 8px;
    text-align: center;
    border: 1px solid #ddd;
}

.care-salary-detail-table th {
    background-color: #2c5aa0;
    color: white;
    font-weight: bold;
}

.care-salary-detail-table .total-row {
    background-color: #f0f8ff;
    font-weight: bold;
}

.care-salary-summary {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

.care-salary-summary h4 {
    margin-top: 0;
    color: #2c5aa0;
}

/* モーダル */
.care-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.care-modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.care-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.care-modal-header h3 {
    margin: 0;
    color: #2c5aa0;
}

.care-close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.care-close:hover {
    color: #333;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .care-container {
        padding: 15px;
    }
    
    .care-form-row {
        flex-direction: column;
    }
    
    .care-nav-tabs {
        padding: 0;
    }
    
    .care-nav-tabs .nav-tab {
        padding: 10px 15px;
        font-size: 12px;
    }
    
    .care-header h1 {
        font-size: 20px;
    }
    
    .care-modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 15px;
    }
}

/* WordPress固有のスタイル調整 */
.care-manager-frontend .wp-block-group {
    margin: 0;
}

.care-manager-frontend .entry-content {
    margin: 0;
}

/* 印刷対応 */
@media print {
    .care-nav-tabs,
    .care-form-row,
    .care-month-nav .care-btn,
    .care-modal {
        display: none !important;
    }
    
    .care-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .care-shift-table,
    .care-calendar-table {
        min-width: auto;
        font-size: 10px;
    }
}