/* desktop-table.css version 1.0.0 */


.unit_main table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 20px 0 20px 0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.unit_main th, .unit_main td {
  border: none;
  padding: 12px 16px;
}

.unit_main th {
  background-color: var(--unit-color);
  color: #fff;
  font-weight: bold;
  font-size: 12px;
  text-align: center !important;
}

.unit_main td {
  text-align: left;
}

.unit_main tr:nth-child(even) {
  background-color: #f9f9f9;
}

.unit_main tr:hover {
  background-color: #f1f1f1;
}

/* 申込済の行カラー */
.unit_main tr.guest-row-applied {
  background-color: #fff6e5; /* 柔らかいオレンジ系 */
}

/* 顔写真にマークを被せるためのラッパ */
.mark-photo-wrap {
  position: relative;
  display: inline-block;
}

/* 写真下に配置するマーク群 */
.mark-overlay {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  justify-content: center;
  margin-top: 4px;
}

.mark-overlay .mark-pill {
  padding: 0 3px;
  border-radius: 8px;
  font-size: 9px;
  line-height: 1.1;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

input:not([type="image" i], [type="range" i], [type="checkbox" i], [type="radio" i]) {
  width: 100%;
  padding: 5px;
  border: 2px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
  transition: border-color 0.3s;
  box-sizing: border-box;
  background-color: white;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Meiryo", "Yu Gothic Medium", "游ゴシック Medium", "Yu Gothic", "游ゴシック", "Noto Sans CJK JP", "Takao Gothic", "IPAexGothic", "IPAPGothic", "VL PGothic", "Noto Sans CJK JP", "MS PGothic", "MS UI Gothic", sans-serif;
}

/* タブレット対応（iPad横向き: 769px〜1024px） */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .unit_main table {
    font-size: 12px;
  }
  
  .unit_main th {
    font-size: 11px;
    padding: 8px 6px;
    white-space: nowrap;
  }
  
  .unit_main td {
    padding: 8px 6px;
  }
}
/* ========================================
   性別アイコン
   ======================================== */
.sex-icon-male {
    color: #1976D2;
    font-size: 16px;
}

.sex-icon-female {
    color: #C2185B;
    font-size: 16px;
}

/* ========================================
   アラート・メッセージ
   ======================================== */
.alert-success-custom {
    background-color: #d4edda;
    color: #155724;
    padding: 12px;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    margin-bottom: 20px;
    white-space: pre-line;
}

/* ========================================
   コンテナ・レイアウト
   ======================================== */
.white-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #666;
    background-color: #f8f9fa;
    border-radius: 5px;
    margin-top: 20px;
}

.event-group-header {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
    margin: 20px 0 10px 0;
    padding: 15px;
    border-radius: 8px;
}

.event-group-title {
    margin: 0;
    font-size: 16px;
    color: #1976d2;
}

.event-group-subtitle {
    margin: 5px 0 0 0;
    font-size: 14px;
    color: #666;
}

.event-group-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}

.event-group-date {
    margin: 0;
    font-size: 12px;
    color: #666;
}

/* ========================================
   テーブル関連
   ======================================== */
.table-overflow {
    overflow-x: auto;
}

.table-min-width {
    min-width: 1500px;
}

.table-header-row {
    background-color: #f8f9fa;
}

.event-header-row {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
}

.event-header-cell {
    padding: 15px;
    font-weight: bold;
    font-size: 16px;
    color: #1976d2;
}

.event-date-text {
    font-size: 14px;
    color: #666;
    margin-left: 10px;
}

.event-count-text {
    font-size: 12px;
    color: #666;
    margin-left: 15px;
}

.guest-row-highlighted {
    background-color: #e8f4fd;
    border: 2px solid #4a90e2;
}

.cell-center {
    text-align: center;
}

.cell-photo {
    text-align: center;
}

.cell-id {
    font-size: 10px;
    color: #666;
}

/* ========================================
   画像・アバター
   ======================================== */
.photo-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #ddd;
}

.photo-img-mobile {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #ddd;
}

.photo-placeholder {
    width: 50px;
    height: 50px;
    background-color: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
    border: 2px solid #ddd;
    margin: 0 auto;
}

/* ========================================
   一覧画像（テーブル用）
   ======================================== */
.table-image-cell {
    text-align: center !important;
}

.data-table .table-image,
img.table-image {
    width: 60px !important;
    height: 60px !important;
    min-width: 60px !important;
    min-height: 60px !important;
    max-width: 60px !important;
    max-height: 60px !important;
    object-fit: cover !important;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: block !important;
    margin: 0 auto !important;
}

.data-table .table-image:hover,
img.table-image:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.data-table .table-image-placeholder,
.table-image-placeholder {
    width: 60px !important;
    height: 60px !important;
    min-width: 60px !important;
    min-height: 60px !important;
    background-color: #f0f0f0;
    border-radius: 4px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin: 0 auto !important;
    color: #999;
    font-size: 24px;
}

/* ========================================
   テキストスタイル
   ======================================== */
.text-small-gray {
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
}

.text-bold {
    font-weight: bold;
}

.text-gray {
    color: #999;
}

.furigana-text {
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
}

.name-text {
    font-weight: bold;
}

.label-small {
    color: #666;
    font-size: 11px;
}

/* ========================================
   バッジ・ピル
   ======================================== */
.category-badge {
    display: inline-block;
    padding: 2px 6px;
    margin: 1px;
    background-color: #e3f2fd;
    border-radius: 3px;
    font-size: 11px;
    color: #1976d2;
}

/* ========================================
   情報表示セル
   ======================================== */
.info-cell {
    max-width: 160px;
    line-height: 1.35;
}

.info-row {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========================================
   ボタンスタイル
   ======================================== */
.btn-edit {
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    text-decoration: none;
    display: inline-block;
    border: none;
    color: white;
}

.btn-follow {
    background: #ff9800;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    text-decoration: none;
    display: inline-block;
}

.btn-member {
    background: #2e7d32;
    padding: 6px 12px;
    font-size: 11px;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-add-guest {
    background: #28a745;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    text-decoration: none;
    display: inline-block;
}

.btn-actions {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
}

/* ========================================
   フォーム要素
   ======================================== */
.checkbox-large {
    transform: scale(1.2);
    min-width: 18px;
    min-height: 18px;
}

.checkbox-xlarge {
    transform: scale(1.3);
    min-width: 20px;
    min-height: 20px;
}

.select-status {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 11px;
    min-width: 40px;
    max-width: 40px;
}

/* ========================================
   モバイルレイアウト
   ======================================== */
.mobile-grid-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.mobile-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    background: #f8f9fa;
}

.mobile-label {
    font-size: 12px;
    font-weight: bold;
    margin: 0;
    cursor: pointer;
    flex: 1;
}

.mobile-select-wrapper {
    padding: 8px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    background: #f8f9fa;
}

.mobile-select-label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: bold;
    color: #333;
}

.mobile-select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
    min-height: 44px;
    background: white;
}

/* ========================================
   モーダル
   ======================================== */
.modal-title-text {
    font-size: 18px;
    color: #333;
    margin: 0 0 5px 0;
}

.modal-subtitle-text {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.modal-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 15px;
}

.modal-steps-container {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.modal-steps-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.modal-steps-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.modal-step-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-step-label {
    font-size: 12px;
    margin: 0;
}

.modal-step-checkbox {
    transform: scale(1.2);
}

.modal-button-row {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-date-display {
    font-size: 12px;
    color: #666;
    margin-left: 8px;
}

/* ========================================
   ボタングループ（テーブル内のアクションボタン）
   ======================================== */
.btn-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.btn-group .btn,
.btn-group form {
    display: inline-flex;
    align-items: center;
}

.btn-group form {
    margin: 0;
}

.btn-group .btn {
    margin: 0;
    height: auto;
    line-height: 1.5;
}

/* ボタングループを含むテーブルセルの中央配置 */
.data-table td:has(.btn-group) {
    text-align: center;
}

/* ========================================
   ユーティリティクラス
   ======================================== */
.ml-10 {
    margin-left: 10px;
}

.ml-15 {
    margin-left: 15px;
}

.mt-10 {
    margin-top: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.gap-4 {
    gap: 4px;
}