/* ラジオ、チェックボックスカスタム */
.form_parts input[type='radio']{
	display:none;
}
.form_parts input[type='checkbox']{
	display:none;
}

.form_parts .radio, .form_parts .checkbox {
    width:auto !important;
	display: inline-block;
	box-sizing: border-box;
	-webkit-transition: background-color 0.06s linear;
	transition: background-color 0.06s linear;
	position: relative;
	margin: 0 2px 8px 0;
	padding: 16px 20px 12px 30px;
	background-color: #ddd;
	vertical-align: middle;
	cursor: pointer;
	font-size:0.7rem;
    border-radius:4px;
}


.form_parts .checkbox{
	height: 50px;
}
.form_parts .radio{
	height: 50px;
}
.form_parts .radio:hover, .form_parts .checkbox:hover {
  background-color: #96f8e9;
}
.form_parts .radio:hover:after, .form_parts .checkbox:hover:after {
  border-color: #96f8e9;
}
/* .radio:after, .checkbox:after {
  -webkit-transition: border-color 0.2s linear;
  transition: border-color 0.2s linear;
  position: absolute;
  top: 50%;
  left: 8px;
  display: block;
  margin-top: -10px;
  width: 16px;
  height: 16px;
  content: '';

border:1px solid #f00

} */

.form_parts .radio:before {
  -webkit-transition: opacity 0.2s linear;
  transition: opacity 0.2s linear;
  position: absolute;
  top: 50%;
  left: 15px;
  display: block;
  margin-top: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #108170;
  content: '';
  opacity: 0;
}
.form_parts input[type=radio]:checked + .radio:before {
  opacity: 1;
}
.form_parts input[type=radio]:checked + .radio {
	background:#55f9e0;
}

.form_parts .checkbox:before {
  -webkit-transition: opacity 0.2s linear;
  transition: opacity 0.2s linear;
  position: absolute;
  top: 50%;
  left: 15px;
  display: block;
  margin-top: -7px;
  width: 5px;
  height: 9px;
  border-right: 3px solid #108170;
  border-bottom: 3px solid #108170;
  content: '';
  opacity: 0;
  -webkit-transform: rotate(34deg);
  -ms-transform: rotate(34deg);
  transform: rotate(34deg);
}
.form_parts input[type=checkbox]:checked + .checkbox:before {
  opacity: 1;
}
.form_parts input[type=checkbox]:checked + .checkbox {
	background:#96f8e9;
}


/* フォームパーツ 基本設定 */
form{
    width:100%;
    box-sizing: border-box;
}
input,
select,
textarea{
    padding:5px;
    border:1px solid #CCC !important;
    color: #333;
    cursor: pointer;
    border-radius:10px;
}
select{
    padding:5px;
    border:1px solid #ccc;
    color: #333;
    cursor: pointer;
}
option{
	font-size:15px;
	cursor: pointer;
}
textarea{
}

input[type=submit]{
	position: relative;
	display: inline-block;
	margin: 0 auto ;
	padding:5%;
	cursor:pointer;
	font-size: 1rem;
	color: #FFFFFF;
	border: 1px solid #e50012;
	background: #E50012 url(../images/common/icon/submit.png) no-repeat 97% 22px;
}
input[type=submit]:hover{
	color: #e50012;
	background: #fff url(../images/common/icon/submit_on.png) no-repeat 97% 22px;

}
input[type='button'],button{
	/* position: relative;
	display: inline-block;
	margin: 0 auto ;
	padding:8px ;
	cursor:pointer;
	font-size: 0.8rem;
	color: #FFFFFF ;
	border: 1px solid #1245BB;
    border-radius:4px;
	background: #222429 ; */
    /* background: #2c3038 !important; */
}
input[type='button']:hover,button:hover{
	background: #4f535f !important;

}
input::placeholder,textarea::placeholder {
  opacity: 0.5 !important;
  color:#167eff !important;
}
input:read-only,
textarea:read-only{
    background:#F0F0F0;
    border: 1px solid #CCC;
}
input[type='file']{
    max-width:100%;
    width: auto !important;
    max-width: 300px !important;
    min-width: 200px !important;
    height: auto !important;
    padding: 0.375rem 0.75rem !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
    border: 1px solid #ced4da !important;
    border-radius: 0.25rem !important;
    background-color: #fff !important;
    cursor: pointer !important;
}

input[type='file']:focus {
    border-color: #80bdff !important;
    outline: 0 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}

/* フォームコントロールのサイズ固定 */
.form-control {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
}

.form-control[type="file"] {
    width: auto !important;
    max-width: 300px !important;
    min-width: 200px !important;
}

.submitArea{
	text-align: center;
	margin: 2px auto;

    width:80%;
    min-width:400px;
}
label {
    cursor: pointer;
}


/* btn */

a.btn, input.btn, button.btn {
  display: inline-block;
  margin: 1rem auto ;
  padding:0.6rem 1.2rem;
  cursor:pointer;
  font-size: 0.8rem;
  color: #FFFFFF ;
  /* border: 1px solid #1245BB; */
  border-radius:4px;
  box-sizing: border-box;
  background: #2c3038 !important;
}
a.btn:hover, input.btn:hover, button.btn:hover {
	background: #4f535f !important;
    color: #FFF;
}

a.btn.size_s,
input.btn.size_s,
button.btn.size_s {
    width:auto;
}
a.btn.size_m,
input.btn.size_m,
button.btn.size_m {
    width:46%;
    max-width:500px;
    font-size: 1rem;
}
a.btn.size_l,
input.btn.size_l,
button.btn.size_l {
    width:100%;
    font-size: 1rem;
}
.cancel{
  display: block;
  width:80%;
  margin:auto;
  padding:0.2rem;
  text-align:center;
  background:#EEE;
  border:1px solid #BBB;
  font-size: 0.7rem;
}
button.cancel:hover{
  background:#ddd !important;
}

/*  */


input.form-control,
select.form-control,
textarea.form-control{
  display: inline-block;
  width: auto; /* デフォルトの100%を上書きして、内容に応じた幅に */
  max-width: 100%; /* 画面幅を超えないように最大幅を指定（必要に応じて） */
  min-width:50%;
}
.form-contro option{
  width:auto;
  padding:auto;
}


.form-group{
    display: flex;
    padding:0.4rem 0;
    align-content: flex-start;
    vertical-align: middle;
}
.form-group label{
    /* display: flex; */
    justify-content: flex-end;
    /* min-width:13rem; */
    margin-right:1rem;
    padding:0.6rem;
    text-align: left;
    background:#f3f3f3;
}
 .form-group > label:nth-child(1){
    width:13rem;
}
 .form-group .content{
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
 }
 .form-group .content label{
    display: inline-block;
    width:auto;
 }
.form-group .unit{
    display: flex;
    align-items: center;
    margin-left:0.8rem;
}
.form-group .must{
    font-size: 0.8rem;
    color: #E50012;
    display: inline-block;
    margin-left:1rem;
}
.form-group #date{
    min-width:180px;
}





@media screen and (max-width: 767px) {
    .form-group{
        display: block;
        padding:0.4rem 0;
        align-content: flex-start;
    }
    .form-group label{
        display:block;
        width:100% !important;
        margin-bottom:1rem;
    }
    .form-group input[type="text"]{
        width:100%;
    }
    .form-group textarea{
        width:100%;
    }
}




/* サイズ */

input.size_ss,
button.size_ss{
  width:8% !important;
  min-width:30px;
}
input.size_s,
button.size_s{
  width:10% !important;
  min-width:180px;
}
input.size_m,
button.size_m{
  width:50% !important;
}
input.size_l,
button.size_l{
  width:100% !important;
}
input.size_30p,
button.size_30p{
  width:30% !important;
  min-width:120px;
}
input.size_50p,
button.size_50p{
  width:50% !important;
  min-width:250px;
}

input.size_70p,
button.size_70p{
  width:70% !important;
  min-width:450px;
}


@media screen and (max-width: 767px) {
    input.size_ss,
    button.size_ss{
    width:10% !important;
    min-width:30px;
    }
    input.size_s,
    button.size_s{
    width:20% !important;
    min-width:auto;
    }
    input.size_m,
    button.size_m{
    width:100% !important;
    }

    input.size_30p,
    button.size_30p{
    width:100% !important;
    }
    input.size_50p,
    button.size_50p{
    width:100% !important;
    }

    input.size_70p,
    button.size_70p{
    width:100% !important;
    }


}


input.w_10px,
button.w_10px{
  width:10px;
}
input.w_20px,
button.w_20px{
  width:20px;
}
input.w_30px,
button.w_30px{
  width:30px;
}
input.w_40px,
button.w_40px{
  width:40px;
}
input.w_50px,
button.w_50px{
  width:50px;
}
input.w_60px,
button.w_60px{
  width:60px;
}
input.w_70px,
button.w_70px{
  width:70px;
}
input.w_80px,
button.w_80px{
  width:80px;
}
input.w_90px,
button.w_90px{
  width:90px;
}
input.w_100px,
button.w_100px{
  width:100px;
}
input.w_200px,
button.w_200px{
  width:200px;
}
input.w_300px,
button.w_300px{
  width:300px;
}
input.w_400px,
button.w_400px{
  width:400px;
}
input.w_500px,
button.w_500px{
  width:500px;
}
input.w_1rem,
button.w_1rem{
  width:1rem;
}
input.w_1hrem,
button.w_1hrem{
  width:1.5rem;
}
input.w_2rem,
button.w_2rem{
  width:2rem;
}
input.w_2hrem,
button.w_2hrem{
  width:2.5rem;
}
input.w_3rem,
button.w_3rem{
  width:3rem;
}
input.w_3hrem,
button.w_3hrem{
  width:3.5rem;
}
input.w_4rem,
button.w_4rem{
  width:4rem;
}
input.w_4hrem,
button.w_4hrem{
  width:4.5rem;
}


textarea.h_3rem{
    min-height: 3rem;
}
textarea.h_4rem{
    min-height: 4rem;
}
textarea.h_5rem{
    min-height: 5rem;
}
textarea.h_6rem{
    min-height: 6rem;
}
textarea.h_7rem{
    min-height: 7rem;
}
textarea.h_8rem{
    min-height: 8rem;
}
textarea.h_9rem{
    min-height: 9rem;
}
textarea.h_10rem{
    min-height: 10rem;
}

.btn-filter {
    width: 300px;
}

/* メッセージテンプレートフォーム用スタイル */
.template-form textarea[name="description"] {
    height: 2.5rem !important;
    min-height: 2.5rem !important;
    resize: none !important;
}

.template-form textarea[name="content"] {
    height: 16rem !important;
    min-height: 16rem !important;
}

.template-form .btn-primary {
    background-color: #2563eb !important;
    color: white !important;
}

.template-form .btn-secondary {
    background-color: #6b7280 !important;
    color: white !important;
}

/* 管理画面統一ボタンコンポーネント */
.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    min-width: 80px;
    white-space: nowrap;
}

.admin-btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-btn:active {
    transform: translateY(0);
}

.admin-btn i {
    margin-right: 0.375rem;
    font-size: 0.875rem;
}

/* プライマリボタン（登録・更新・保存） */
.admin-btn-primary {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

.admin-btn-primary:hover {
    background-color: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

/* セカンダリボタン（編集・詳細） */
.admin-btn-secondary {
    background-color: #666666;
    border-color: #666666;
    color: #ffffff;
}

.admin-btn-secondary:hover {
    background-color: #059669;
    border-color: #059669;
    color: #ffffff;
}

/* ワーニングボタン（削除・キャンセル） */
.admin-btn-warning {
    background-color: #ef4444;
    border-color: #ef4444;
    color: #ffffff;
}

.admin-btn-warning:hover {
    background-color: #dc2626;
    border-color: #dc2626;
    color: #ffffff;
}

/* 情報ボタン（検索・リセット・戻る） */
.admin-btn-info {
    background-color: #6b7280;
    border-color: #6b7280;
    color: #ffffff;
}

.admin-btn-info:hover {
    background-color: #4b5563;
    border-color: #4b5563;
    color: #ffffff;
}

/* ライトボタン（プレビュー・その他） */
.admin-btn-light {
    background-color: #f3f4f6;
    border-color: #d1d5db;
    color: #374151;
}

.admin-btn-light:hover {
    background-color: #e5e7eb;
    border-color: #9ca3af;
    color: #374151;
}

/* サイズバリエーション */
.admin-btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    min-width: 60px;
}

.admin-btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    min-width: 100px;
}

/* 幅バリエーション */
.admin-btn-w-auto {
    width: auto;
}

.admin-btn-w-full {
    width: 100%;
}

.admin-btn-w-50 {
    width: 50%;
}

/* ボタングループ */
.admin-btn-group {
    display: inline-flex;
    gap: 0.5rem;
}

.admin-btn-group .admin-btn {
    margin: 0;
}

/* フォーム送信ボタン専用 */
.admin-btn-submit {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    min-width: 120px;
}

.admin-btn-submit:hover {
    background-color: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

/* 検索フォーム専用 */
.admin-search-btn {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

.admin-search-btn:hover {
    background-color: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.admin-reset-btn {
    background-color: #6b7280;
    border-color: #6b7280;
    color: #ffffff;
}

.admin-reset-btn:hover {
    background-color: #4b5563;
    border-color: #4b5563;
    color: #ffffff;
}

/* モダン登録フォーム */
.modern-register-form {
    background: #f3fbff;
    border: 1px solid #e9f8ff;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.modern-register-form .form-container h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
}

.modern-register-form .form-hint {
    margin: 0 0 1rem 0;
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.4;
}

.modern-register-form .inline-form {
    margin: 0;
}

.modern-register-form .form-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.modern-register-form .modern-input,
.modern-register-form .modern-select,
.modern-register-form .modern-textarea {
    flex: 1;
    min-width: 200px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background-color: #ffffff;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.modern-register-form .modern-input:focus,
.modern-register-form .modern-select:focus,
.modern-register-form .modern-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.modern-register-form .modern-textarea {
    resize: vertical;
    min-height: 2.5rem;
    max-height: 6rem;
}

.modern-register-form .modern-file-input {
    flex: 1;
    min-width: 200px;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background-color: #ffffff;
    cursor: pointer;
}

.modern-register-form .modern-file-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.modern-register-form .price-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 200px;
}

.modern-register-form .price-input-group .modern-input {
    flex: 1;
}

.modern-register-form .price-input-group .unit {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
    white-space: nowrap;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .modern-register-form .form-row {
        flex-direction: column;
        align-items: stretch;
    }

    .modern-register-form .modern-input,
    .modern-register-form .modern-select,
    .modern-register-form .modern-textarea,
    .modern-register-form .modern-file-input,
    .modern-register-form .price-input-group {
        min-width: auto;
        width: 100%;
    }

    .modern-register-form .admin-btn-submit {
        width: 100%;
    }
}

/* キャスト削除ボタン */
.delete-cast-btn {
    background: none;
    border: none;
    color: #dc2626;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease-in-out;
}

.delete-cast-btn:hover {
    background-color: #fef2f2;
    color: #b91c1c;
}

.delete-cast-btn:active {
    transform: scale(0.95);
}

/* キャスト削除テキストボタン */
.delete-cast-text-btn {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.5rem 0;
    text-decoration: underline;
    transition: all 0.2s ease-in-out;
}

.delete-cast-text-btn:hover {
    color: #dc2626;
}

.delete-cast-text-btn i {
    margin-right: 0.25rem;
}

/* 削除セクション */
.delete-section {
    margin-left: auto;
    text-align: right;
}

/* ファイルアップロード */
.modern-file-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background-color: #ffffff;
    font-size: 0.875rem;
    transition: border-color 0.2s ease-in-out;
    cursor: pointer;
}

.modern-file-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.modern-file-input:hover {
    border-color: #9ca3af;
}

/* ファイルアップロードのスタイル改善 */
.modern-file-input::-webkit-file-upload-button {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
    margin-right: 0.5rem;
    font-size: 0.875rem;
}

.modern-file-input::-webkit-file-upload-button:hover {
    background: #2563eb;
}

.modern-file-input::file-selector-button {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
    margin-right: 0.5rem;
    font-size: 0.875rem;
}

.modern-file-input::file-selector-button:hover {
    background: #2563eb;
}

/* 現在の画像表示 */
.current-image {
    margin: 1rem 0;
    padding: 1rem;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
}

.current-image img {
    border-radius: 0.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.current-image p {
    margin: 0.5rem 0 0 0;
    font-size: 0.75rem;
    color: #6b7280;
}

/* アクションボタンコンテナ */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    justify-content: center;
}
