/* DVTV Holiday Management Styles */

/* 共通 */
.dvtv-hm-form-wrapper,
.dvtv-hm-admin-form,
.dvtv-hm-admin-list,
.dvtv-hm-user-list,
.dvtv-hm-settings-form-wrapper {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dvtv-hm-form h3,
.dvtv-hm-admin-form h3,
.dvtv-hm-admin-list h3,
.dvtv-hm-user-list h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #0073aa;
    color: #23282d;
}

/* フォーム */
.dvtv-hm-form-row {
    margin-bottom: 20px;
}

.dvtv-hm-form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #23282d;
}

.dvtv-hm-form-row input[type="text"],
.dvtv-hm-form-row input[type="date"],
.dvtv-hm-form-row input[type="number"],
.dvtv-hm-form-row select,
.dvtv-hm-form-row textarea {
    width: 100%;
    max-width: 400px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.dvtv-hm-form-row textarea {
    max-width: 100%;
}

.dvtv-hm-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dvtv-hm-input-group input {
    width: auto !important;
}

.required {
    color: #dc3232;
}

.dvtv-hm-hint {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* ラジオ・チェックボックス */
.dvtv-hm-radio-group,
.dvtv-hm-checkbox-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.dvtv-hm-radio-group label,
.dvtv-hm-checkbox-group label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: normal;
    cursor: pointer;
}

.dvtv-hm-checkbox-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
}

.dvtv-hm-checkbox-item {
    display: block;
    padding: 8px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.dvtv-hm-checkbox-item:hover {
    background: #f5f5f5;
}

.dvtv-hm-checkbox-item:last-child {
    border-bottom: none;
}

/* ボタン */
.dvtv-hm-submit-btn,
.dvtv-hm-btn {
    display: inline-block;
    padding: 10px 24px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.dvtv-hm-submit-btn:hover,
.dvtv-hm-btn:hover {
    background: #005a87;
}

.dvtv-hm-btn-secondary {
    background: #f0f0f1;
    color: #23282d;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.dvtv-hm-btn-secondary:hover {
    background: #e5e5e5;
}

.dvtv-hm-btn-danger {
    background: #dc3232;
}

.dvtv-hm-btn-danger:hover {
    background: #a82828;
}

.dvtv-hm-btn-small {
    padding: 4px 8px;
    font-size: 12px;
}

.dvtv-hm-form-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.dvtv-hm-back-btn {
    margin-top: 10px;
}

/* 結果表示 */
.dvtv-hm-result {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
}

.dvtv-hm-result.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.dvtv-hm-result.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.dvtv-hm-hidden {
    display: none !important;
}

/* 通知・警告 */
.dvtv-hm-info {
    padding: 10px 15px;
    background: #e7f3ff;
    border-left: 4px solid #0073aa;
    margin-bottom: 20px;
}

.dvtv-hm-notice {
    padding: 15px;
    background: #fff8e5;
    border: 1px solid #ffd54f;
    border-radius: 4px;
    color: #856404;
}

.dvtv-hm-error {
    padding: 15px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
}

.dvtv-hm-warning {
    padding: 10px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    color: #856404;
    margin-top: 5px;
}

/* テーブル */
.dvtv-hm-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.dvtv-hm-table th,
.dvtv-hm-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.dvtv-hm-table th {
    background: #f5f5f5;
    font-weight: 600;
}

.dvtv-hm-table tr:hover {
    background: #f9f9f9;
}

.dvtv-hm-table tr.used {
    background: #f0f0f0;
    color: #666;
}

.dvtv-hm-table tr.under-standard {
    background: #fff3cd;
}

.dvtv-hm-disabled-row {
    opacity: 0.5;
}

/* ステータス */
.dvtv-hm-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.dvtv-hm-status.unused {
    background: #d4edda;
    color: #155724;
}

.dvtv-hm-status.partial {
    background: #fff3cd;
    color: #856404;
}

.dvtv-hm-status.used {
    background: #e2e3e5;
    color: #383d41;
}

.dvtv-hm-status.payout-only {
    background: #cce5ff;
    color: #004085;
}

/* バッジ */
.dvtv-hm-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    margin-left: 5px;
}

.dvtv-hm-badge.new-rule {
    background: #d63384;
    color: #fff;
}

.dvtv-hm-shortage {
    color: #dc3232;
    font-size: 12px;
}

.dvtv-hm-pending {
    color: #666;
    font-style: italic;
}

.dvtv-hm-paid-mark {
    color: #0073aa;
    font-size: 12px;
}

/* 統計 */
.dvtv-hm-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.dvtv-hm-stat-item {
    background: #f5f5f5;
    padding: 15px 20px;
    border-radius: 8px;
    min-width: 150px;
}

.dvtv-hm-stat-item .label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.dvtv-hm-stat-item .value {
    font-size: 20px;
    font-weight: 600;
    color: #0073aa;
}

/* フィルター */
.dvtv-hm-filter-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
}

.dvtv-hm-filter-form select,
.dvtv-hm-filter-form input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.dvtv-hm-count {
    color: #666;
    font-size: 14px;
}

/* トグルスイッチ */
.dvtv-hm-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.dvtv-hm-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.dvtv-hm-toggle .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 24px;
}

.dvtv-hm-toggle .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

.dvtv-hm-toggle input:checked + .slider {
    background-color: #0073aa;
}

.dvtv-hm-toggle input:checked + .slider:before {
    transform: translateX(26px);
}

.dvtv-hm-toggle input:disabled + .slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 一括処理 */
.dvtv-hm-bulk-payout {
    max-width: 1000px;
}

.dvtv-hm-bulk-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 4px;
}

.dvtv-hm-selected-count {
    margin-left: auto;
    font-size: 14px;
}

.dvtv-hm-bulk-user-group {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.dvtv-hm-bulk-user-header {
    padding: 10px 15px;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.dvtv-hm-bulk-user-header label {
    cursor: pointer;
}

.dvtv-hm-count {
    color: #666;
    font-size: 12px;
}

.dvtv-hm-bulk-records {
    padding: 10px 15px;
}

.dvtv-hm-bulk-record-item {
    display: block;
    padding: 8px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.dvtv-hm-bulk-record-item:hover {
    background: #f9f9f9;
}

.dvtv-hm-bulk-record-item:last-child {
    border-bottom: none;
}

/* データ管理 */
.dvtv-hm-data-actions {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
}

/* リンク */
.dvtv-hm-links {
    font-size: 12px;
}

.dvtv-hm-links a {
    color: #0073aa;
    text-decoration: none;
}

.dvtv-hm-links a:hover {
    text-decoration: underline;
}

/* 備考トグル */
.dvtv-hm-toggle-notes2 {
    margin-top: 5px;
    padding: 5px 10px;
    background: none;
    border: 1px dashed #999;
    color: #666;
    cursor: pointer;
    font-size: 12px;
}

.dvtv-hm-toggle-notes2:hover {
    border-color: #0073aa;
    color: #0073aa;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .dvtv-hm-form-wrapper,
    .dvtv-hm-admin-form,
    .dvtv-hm-admin-list,
    .dvtv-hm-user-list {
        padding: 15px;
        margin: 10px;
    }
    
    .dvtv-hm-table {
        font-size: 12px;
    }
    
    .dvtv-hm-table th,
    .dvtv-hm-table td {
        padding: 6px;
    }
    
    .dvtv-hm-filter-form {
        flex-direction: column;
    }
    
    .dvtv-hm-stats {
        flex-direction: column;
    }
    
    .dvtv-hm-bulk-actions {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .dvtv-hm-selected-count {
        margin-left: 0;
        margin-top: 10px;
    }
}
