/**
 * 宿曜関係図プラグインのスタイル
 */

.shukuyo-kankei-container * {
    box-sizing: border-box;
}

/* ダークモードの影響を受けないようにする */
.shukuyo-kankei-container {
    color-scheme: light !important;
    -webkit-color-scheme: light !important;
}

.shukuyo-kankei-container h1,
.shukuyo-kankei-container h2,
.shukuyo-kankei-container h3,
.shukuyo-kankei-container h4,
.shukuyo-kankei-container h5 {
    margin-top: 0;
}

.shukuyo-kankei-container {
    font-family: 'Hiragino Kaku Gothic Pro', 'Meiryo', sans-serif;
    max-width: 100%;
    width: 100%;
    margin: 0;
    background: white;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
}

/* 通常の投稿・固定ページ用（中央寄せ・最大幅制限） */
.shukuyo-kankei-container.shukuyo-centered {
    max-width: 1400px;
    margin: 0 auto;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.shukuyo-kankei-header {
    background: #2f4169 !important;
    color: white !important;
    padding: 30px;
    text-align: center;
}

.shukuyo-kankei-header h1 {
    color: white !important;
    font-size: 2.5em;
    margin-bottom: 10px;
    margin-top: 0;
}

.shukuyo-kankei-header p {
    color: white !important;
    font-size: 1.1em;
    opacity: 0.9;
    margin: 0;
}

/* 初期入力画面 */
.shukuyo-initial-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
    padding: 50px;
}

.shukuyo-initial-form {
    background: #e6e5e5 !important;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* 初期入力画面のタイトル - 少し大きめの文字 */
.shukuyo-initial-title {
    background: #2f4169 !important;
    color: #ffffff !important;
    font-size: 1.5em;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding: 20px;
    text-align: center;
    border-radius: 10px;
    line-height: 1.6;
}

/* 薄いグレー背景のサブタイトル - 濃い色の文字 */
.shukuyo-initial-form .subtitle {
    color: #333333 !important;
    background: transparent !important;
    text-align: center;
    margin-bottom: 30px;
    margin-top: 10px;
    font-size: 1.1em;
    font-weight: 400;
}

/* 薄いグレー背景のテキスト - 濃い色の文字 */
.shukuyo-initial-form p {
    color: #333333 !important;
}

.shukuyo-initial-screen p {
    color: #333333 !important;
}

.shukuyo-content {
    display: none;
    grid-template-columns: 350px 1fr;
    gap: 20px;
    padding: 30px;
}

.shukuyo-sidebar {
    background: #e6e5e5;
    border-radius: 15px;
    padding: 25px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.shukuyo-main-area {
    background: #ffffff;
    border-radius: 15px;
    padding: 25px;
    border: 2px solid #e0e0e0;
}

.shukuyo-input-section {
    margin-bottom: 25px;
}

.shukuyo-input-section h3 {
    color: #1a1a1a !important;
    margin-top: 0 !important;
    margin-bottom: 15px;
    font-size: 1.3em;
    border-bottom: 2px solid #2f4169;
    padding-bottom: 10px;
    font-weight: 700;
}

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

.shukuyo-form-group label {
    display: block;
    margin-bottom: 5px;
    color: #1a1a1a !important;
    font-weight: 600;
}

/* 初期入力フォームのラベルは濃い色 */
.shukuyo-initial-form .shukuyo-form-group label {
    color: #1a1a1a !important;
    background: transparent !important;
}

/* 初期画面のエラーとローディング表示 */
.shukuyo-initial-form .shukuyo-error,
#shukuyoInitialError {
    background: #fed7d7 !important;
    color: #c53030 !important;
}

.shukuyo-initial-form .shukuyo-loading,
#shukuyoInitialLoading {
    color: #2f4169 !important;
}

.shukuyo-kankei-container input[type="text"],
.shukuyo-kankei-container input[type="date"],
.shukuyo-kankei-container input[type="file"],
.shukuyo-kankei-container input[type="number"],
.shukuyo-kankei-container select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s;
}

.shukuyo-kankei-container input:focus,
.shukuyo-kankei-container select:focus {
    outline: none;
    border-color: #2f4169;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.shukuyo-date-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.shukuyo-btn {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.shukuyo-btn-primary {
    background: linear-gradient(135deg, #002060 0%, #003a99 100%);
    color: white;
}

.shukuyo-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 32, 96, 0.4);
}

.shukuyo-btn-danger {
    background: linear-gradient(135deg, #f56565 0%, #c53030 100%);
    color: white;
}

.shukuyo-btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 101, 101, 0.4);
}

.shukuyo-btn-secondary {
    background: linear-gradient(135deg, #002060 0%, #004080 100%);
    color: white;
}

.shukuyo-btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 32, 96, 0.4);
}

.shukuyo-svg-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    margin-bottom: 20px;
}

.shukuyo-svg-container svg {
    max-width: 100%;
    max-height: 800px;
    cursor: pointer;
    width: 100%;
    height: auto;
}

/* スマホ対応 */
@media (max-width: 768px) {
    .shukuyo-svg-container svg {
        max-height: none;
        width: 100%;
        height: auto;
    }
}

/* PCのスクロールバーを非表示 */
.scroll-container-pc::-webkit-scrollbar {
    display: none;
}

/* スマホのスクロールバーを細く表示 */
.scroll-container-mobile::-webkit-scrollbar {
    width: 6px;
}

.scroll-container-mobile::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.scroll-container-mobile::-webkit-scrollbar-track {
    background-color: rgba(0, 0, 0, 0.1);
}

.shukuyo-person-list {
    margin-top: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.shukuyo-person-item {
    background: white;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.shukuyo-person-item:hover {
    border-color: #2f4169;
    transform: translateX(5px);
}

.shukuyo-person-item.shukuyo-base-person {
    border-color: #2f4169;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.shukuyo-person-info {
    flex: 1;
}

.shukuyo-person-name {
    font-weight: 600;
    color: #1a1a1a !important;
    margin-bottom: 3px;
}

.shukuyo-person-details {
    font-size: 0.9em;
    color: #333333 !important;
}

.shukuyo-special-day {
    color: #c53030;
    font-weight: 600;
}

.shukuyo-base-badge {
    background: #2f4169;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    margin-left: 8px;
}

.shukuyo-delete-btn {
    padding: 6px 12px;
    background: #f56565;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s;
}

.shukuyo-delete-btn:hover {
    background: #c53030;
}

.shukuyo-current-shuku-display {
    background: #2f4169 !important;
    background-color: #2f4169 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 20px;
}

.shukuyo-current-shuku-display h2 {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background-color: transparent !important;
    font-size: 2em;
    margin-bottom: 5px;
    margin-top: 0;
}

.shukuyo-current-shuku-display p {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background-color: transparent !important;
    opacity: 0.9;
    margin-bottom: 5px;
}

/* ID指定でさらに確実に */
#shukuyoCurrentShukuDisplay,
#shukuyoDisplayShukuName,
#shukuyoBasePersonDisplayName {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.shukuyo-loading {
    display: none;
    text-align: center;
    padding: 20px;
    color: #2f4169;
    font-size: 1.2em;
}

.shukuyo-error {
    background: #fed7d7;
    color: #c53030;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: none;
}

.shukuyo-success {
    background: #c6f6d5;
    color: #2f855a;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: none;
}

@media (max-width: 1024px) {
    .shukuyo-content {
        grid-template-columns: 1fr;
    }

    .shukuyo-sidebar {
        position: static;
    }
}

/* スクロールバーを非表示(Webkit) */
.shukuyo-kankei-container div::-webkit-scrollbar {
    display: none;
}
