@charset "UTF-8";

/* ==============================
   画像投稿エリア
============================== */

.image-field {
	margin-bottom: 0;
}

.image-dropzone {
	width: 100%;
	padding: 30px;
	border: 2px dashed #bbb;
	border-radius: 12px;
	background: #f0f0f0;
	text-align: center;
	cursor: pointer;
	position: relative;
	transition: background 0.2s, border-color 0.2s;
}

.image-dropzone:hover {
	background: #e6e6e6;
	border-color: #999;
}

.image-dropzone-text {
	font-size: 15px;
	color: #666;
}

/* input[type=file] を透明にして全面に重ねる */
.image-dropzone input[type="file"] {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

/* ==============================
   EXIF関連
============================== */
.exif-section {
	margin: 20px 0;
	font-family: sans-serif;
}

.exif-note {
	font-size: 14px;
	line-height: 1.6;
}

.exif-subnote {
	font-size: 12px;
	color: #777;
	margin-top: 4px;
}
.exif-toggle-row {
	margin-top: 14px;
	display: flex;
	align-items: center;
	width: 100%;
	gap: 12px;
	flex-wrap: nowrap;
}

/* トグルスイッチ本体 */
.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
    flex: 0 0 auto;
    margin-bottom: 0;
	transform: translateY(-2px);
}

/* input は非表示 */
.switch input {
    display: none;
}

/* スライダー部分（背景） */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc; /* OFF時の背景 */
    transition: 0.3s;
    border-radius: 24px; /* 丸み */
}

/* 丸いノブ */
.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

/* ON時の背景色 */
.switch input:checked + .slider {
    background-color: #47e; /* iPhoneの緑 */
}

/* ON時のノブ位置 */
.switch input:checked + .slider:before {
    transform: translateX(22px);
}


.exif-message-wrapper {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 24px;
}

.exif-message {
	flex: 1 1 auto;
	font-size: 14px;
	line-height: 24px;
	min-width: 0;
	word-break: break-word;
}

.exif-message.off {
	color: #888;
}

.exif-message.on {
	color: #222;
}

.exif-subinfo {
	font-size: 12px;
	color: #999;
	margin-top: 2px;
	display: inline-block;
}

/* ==============================
   西暦 / 和暦 切り替えボタン
============================== */
.year-mode-buttons {
	display: flex;
	gap: 8px;
	margin-bottom: 8px;
}

.year-mode-buttons button {
	padding: 6px 12px;
	border: 1px solid #ccc;
	background: #f5f5f5;
	cursor: pointer;
	border-radius: 4px;
	color: #333;
	transition: 0.2s;
}

.year-mode-buttons button.active {
	background: #0078d4;
	color: white;
	border-color: #0078d4;
}

/* ==============================
   西暦 / 和暦 入力行
============================== */
.year-row,
.wareki-row {
	display: flex;
	align-items: center;
	gap: 10px;
}

.year-row {
	min-height: 48px;
}

#seireki-box {
	display: flex;
}

#yearInput {
	padding: 12px 14px;
	height: 48px;
	line-height: 1.4;
	border-radius: 10px;
	box-sizing: border-box;
	display: flex;
	align-items: center;
}

#yearInput.input-error {
	border: 2px solid #e66;
	background: #fff5f5;
}

.year-suffix {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	height: 48px;
	padding-left: 6px;
	font-size: 16px;
	margin-left: 0;
	flex: 0 0 auto;
}

.wareki-row .year-suffix {
	margin-left: -6px;
}

/* ==============================
   和暦入力（元号 + 年数）
============================== */
.wareki-row {
	position: relative;
}

#era-input {
	width: 200px;
	padding: 12px 14px;
	height: 48px;
	line-height: 1.4;
	border-radius: 10px;
}

#era-year {
	width: 80px;
	padding: 12px 14px;
	height: 48px;
	line-height: 1.4;
	border-radius: 10px;
	appearance: none;
	-webkit-appearance: none;
}

/* ==============================
   和暦候補リスト
============================== */
.era-list-box {
	position: absolute;
	top: 36px;
	left: 0;
	background: white;
	border: 1px solid #ccc;
	width: 200px;
	max-height: 180px;
	overflow-y: auto;
	border-radius: 4px;
	z-index: 100;
	display: none;
}

.era-item {
	padding: 6px 10px;
	cursor: pointer;
}

.era-item:hover {
	background: #e6f2ff;
}

/* ================================
   プレビュー画像
================================ */
.preview {
	width: 100%;
	height:auto;
	max-width: 320px;
	border-radius: 10px;
	margin-top: 10px;
	display: block;
}

#cropButtons {
	display: flex;
	gap: 10px;
	margin: 20px 10px;
}

#cropButtons button {
	flex: 1;
	display:none ;
}

/* ================================
   トリミングモーダル
================================ */
#cropModal {
	display: none;
	position: fixed;
	top: 0; left: 0;
	width: 100%; height: 100%;
	background: rgba(0,0,0,0.75);
	z-index: 9999;
	padding-top: 40px;
	text-align: center;
}

#cropOuter {
	padding: 20px;
	width: 100%;
	max-width: 420px;
	margin: 0 auto;
	background: var(--card);
	border-radius: 14px;
	box-shadow: 0 4px 14px rgba(0,0,0,0.2);
	overflow: auto;
}

#cropArea {
	width: 100%;
	padding: 0;
}


#cropArea img {
	max-width: 100%;
	height: auto;
	display: block;
}

#cropButton {
	position: fixed;
	bottom: 10vh;
	left: 50%;
	transform: translateX(-50%);
	width: 80% !important;
	padding: 12px;
	background: #007bff;
	color: #fff;
	border: none;
	border-radius: 8px;
	font-size: 18px;
	z-index: 10000;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* ================================
   エラー通知
================================ */
.error-field {
	border-color: #e74c3c !important;
	box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.25) !important;
}

.shake {
	animation: shake 0.3s;
}

@keyframes shake {
	0% { transform: translateX(0); }
	25% { transform: translateX(-6px); }
	50% { transform: translateX(6px); }
	75% { transform: translateX(-6px); }
	100% { transform: translateX(0); }
}

/* ================================
   Google Places オートコンプリート
================================ */
.pac-container {
	border-radius: 12px !important;
	box-shadow: 0 6px 20px rgba(0,0,0,0.12) !important;
	border: 1px solid #ddd !important;
	overflow: hidden !important;
	background: #fafafa !important;
	font-family: var(--font) !important;
	padding: 6px 0 !important;
}

.pac-item {
	padding: 6px 18px !important;
	font-size: 12px !important;
	color: #333 !important;
	border-top: 1px solid #eee !important;
	transition: background 0.15s ease, padding-left 0.15s ease;
	white-space: normal !important;
	height: auto !important;
	line-height: 1.4 !important;
}

.pac-item:first-child {
	border-top: none !important;
}

.pac-item:hover {
	background: #f0f4f8 !important;
	padding-left: 22px !important;
}

.pac-item span {
	white-space: normal !important;
}

.pac-item-query {
	font-weight: 600 !important;
	color: var(--accent) !important;
}

.pac-matched {
	color: var(--accent-light) !important;
}

.pac-icon {
	width: 20px !important;
	height: 22px !important;
	margin-right: 8px !important;
}

