/* =============================================================
   photo-download.css
   写真ダウンロード機能 共通スタイル
   ============================================================= */

/* --- 共通ボタン --- */
.photo-btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: opacity 0.2s;
}
.photo-btn:hover { opacity: 0.8; }
.photo-btn--primary   { background: #0073aa; color: #fff; }
.photo-btn--secondary { background: #f0f0f0; color: #333; border: 1px solid #ccc; }
.photo-btn--large     { padding: 14px 32px; font-size: 16px; }
.photo-btn:disabled   { opacity: 0.4; cursor: not-allowed; }

/* =============================================================
   写真一覧ページ (archive-photo.php)
   ============================================================= */
.photo-archive__inner  { max-width: 1200px; margin: 0 auto; padding: 40px 20px; }
.photo-archive__title  { font-size: 28px; margin-bottom: 24px; }

.photo-archive__filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.photo-filter-btn {
    padding: 6px 16px;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}
.photo-filter-btn.is-active,
.photo-filter-btn:hover { background: #0073aa; color: #fff; border-color: #0073aa; }

.photo-archive__bulk-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}
.photo-selected-count { font-size: 14px; color: #555; }

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}
.photo-grid__item {
    position: relative;
    background: #fff;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.2s;
}
/* .photo-grid__item.is-selected { border-color: #43A857; } */

.photo-checkbox { position: absolute; top: 8px; left: 8px; z-index: 10; cursor: pointer; }
.photo-checkbox__input { display: none; }
.photo-checkbox__mark {
    display: block;
    width: 22px; height: 22px;
    background: rgba(255,255,255,0.9);
    border: 2px solid #ccc;
    border-radius: 4px;
    transition: all 0.2s;
}
.photo-checkbox__input:checked + .photo-checkbox__mark { background: #0073aa; border-color: #0073aa; }
.photo-checkbox__input:checked + .photo-checkbox__mark::after {
    content: '';
    display: block;
    width: 5px; height: 10px;
    border: 2px solid #fff;
    border-top: none; border-left: none;
    transform: rotate(45deg);
    margin: 2px auto 0;
}

.photo-grid__link    { display: block; position: relative; overflow: hidden; max-height: 181px; }
.photo-grid__image   { width: 100%; height: 180px; object-fit: cover; display: block; transition: transform 0.3s; }
.photo-grid__link:hover .photo-grid__image { transform: scale(1.05); }
.photo-grid__no-image { width: 100%; height: 180px; background: #eee; display: flex; align-items: center; justify-content: center; color: #999; }
.photo-grid__overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.2s;
}
.photo-grid__link:hover .photo-grid__overlay { opacity: 1; }
.photo-grid__detail-text { color: #fff; font-size: 13px; font-weight: bold; }
.photo-grid__info  { padding: 10px 12px; }
.photo-grid__title { font-size: 14px; margin: 0 0 6px; }
.photo-grid__cats  { display: flex; flex-wrap: wrap; gap: 4px; }
.photo-grid__cat   { font-size: 11px; background: #0166CA; color: #fff; padding: 2px 8px; border-radius: 10px; }

/* =============================================================
   写真詳細ページ (single-photo.php)
   ============================================================= */
.photo-single__inner { max-width: 1000px; margin: 0 auto; padding: 40px 20px; }

.photo-breadcrumb__list { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; padding: 0; margin: 0 0 20px; font-size: 13px; color: #999; }
.photo-breadcrumb__item + .photo-breadcrumb__item::before { content: '/'; margin-right: 4px; }
.photo-breadcrumb__item a { color: #43A857; text-decoration: none; }
.photo-breadcrumb__item.is-current { color: #555; }

.photo-single__title { font-size: 26px; margin-bottom: 28px; }
.photo-single__layout {
    display: grid;
    grid-template-columns: 1fr 50%;
    gap: 40px;
    align-items: start;
}
@media (max-width: 768px) { .photo-single__layout { grid-template-columns: 1fr; } }

.photo-single__image    { width: 100%; height: auto; border-radius: 6px; display: block; }
.photo-single__no-image { width: 100%; aspect-ratio: 4/3; background: #eee; display: flex; align-items: center; justify-content: center; color: #999; border-radius: 6px; }
.photo-single__meta     { display: flex; flex-direction: column; gap: 20px; }
.photo-single__meta-label { font-size: 12px; font-weight: bold; color: #888; display: block; margin-bottom: 4px; }
.photo-single__description p { font-size: 14px; line-height: 1.8; color: #444; margin: 0; }
.photo-single__cats,
.photo-single__tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.photo-single__cat,
.photo-single__tag  { text-decoration: none; background: #0166CA; color: #fff; padding: 3px 10px; border-radius: 12px; font-size: 12px; }
.photo-single__download   { grid-column: 1 / 3; }
.photo-single__no-download { font-size: 13px; color: #999; }
.photo-single__back       { margin-top: 40px; }

/* =============================================================
   フォームページ プレビューエリア
   ============================================================= */
#photo-preview-area    { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.photo-preview__item   { text-align: center; }
.photo-preview__image  { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; border: 1px solid #ddd; display: block; }
.photo-preview__title  { color: #555; margin: 4px 0 0; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* =============================================================
   フォームページ (pd-form)
   ============================================================= */
.pd-form-wrap    { max-width: 640px; margin: 0 auto; }
.pd-errors       { background: #fff0f0; border: 1px solid #f5c6cb; border-radius: 4px; padding: 16px 20px; margin-bottom: 24px; }
.pd-errors ul    { margin: 0; padding-left: 20px; }
.pd-errors li    { color: #c0392b; font-size: 14px; }

.pd-preview-wrap  { margin-bottom: 28px; }
.pd-preview-label { font-size: 20px; font-weight: bold; color: #6B4726; margin-bottom: 15px; }

.pd-form__field  { margin-bottom: 20px; }
.pd-form__label  { display: block; font-size: 14px; font-weight: bold; margin-bottom: 6px; color: #333; }
.pd-required     { display: inline-block; font-size: 11px; background: #e74c3c; color: #fff; padding: 1px 6px; border-radius: 3px; margin-left: 6px; vertical-align: middle; }
.pd-form__input,
.pd-form__select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 15px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.pd-form__input:focus,
.pd-form__select:focus  { outline: none; border-color: #0073aa; box-shadow: 0 0 0 2px rgba(0,115,170,0.15); }
.pd-form__actions       { margin-top: 32px; text-align: center; }

/* =============================================================
   確認ページ (pd-confirm)
   ============================================================= */
.pd-confirm-wrap    { max-width: 640px; margin: 0 auto; padding: 40px 20px; }
.pd-confirm-note    { color: #555; margin-bottom: 24px; }
.pd-confirm-table   { width: 100%; border-collapse: collapse; margin-bottom: 32px; font-size: 14px; }
.pd-confirm-table th,
.pd-confirm-table td { padding: 12px 16px; border: 1px solid #ddd; text-align: left; }
.pd-confirm-table th { background: #f5f5f5; width: 160px; font-weight: bold; color: #444; }
.pd-confirm-table td { color: #333; }

/* =============================================================
   サンキューページ (pd-thankyou)
   ============================================================= */
.pd-thankyou-wrap    { max-width: 640px; margin: 0 auto; padding: 40px 20px; text-align: center; }
.pd-thankyou__title  { font-size: 24px; margin-bottom: 16px; }
.pd-thankyou__text   { font-size: 15px; color: #555; line-height: 1.8; margin-bottom: 32px; }
.pd-download-list    { text-align: left; margin-bottom: 32px; }
.pd-download-item    { display: flex; align-items: center; gap: 16px; padding: 16px; border: 1px solid #e0e0e0; border-radius: 6px; margin-bottom: 12px; }
.pd-download-item__thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.pd-download-item__info  { flex: 1; }
.pd-download-item__title { font-size: 14px; font-weight: bold; margin: 0 0 8px; }
.pd-thankyou__back   { margin-top: 16px; }
