/**
 * 投稿詳細ページ専用CSS
 * details/index.php で使用
 */

body {
    padding-bottom: 80px;
}
.post-detail {
    background: white;
    overflow: hidden;
}
@media (max-width: 599px) {
    .post-detail {
        margin: 10px;
        border-radius: 8px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
    .comment-section {
        margin: 10px;
        border-radius: 8px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
}
.post-title {
    padding: 15px;
    font-size: 20px;
    font-weight: bold;
    border-bottom: 1px solid #eee;
}
.post-user {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #eee;
}
.post-user img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}
.follow-btn {
    margin-left: auto;
    padding: 6px 16px;
    border: 1px solid #3498db;
    background: white;
    color: #3498db;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}
.follow-btn:hover {
    background: #ecf0f1;
}
.follow-btn.following {
    background: #3498db;
    color: white;
}
.follow-btn.following:hover {
    background: #2980b9;
}
.follow-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.post-images {
    position: relative;
    overflow: hidden;
}
.image-slider {
    display: flex;
    transition: transform 0.3s ease;
}
.post-image {
    width: 100%;
    height: 400px;
    flex-shrink: 0;
    display: block;
    object-fit: cover;
}
.slider-controls {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    background: rgba(0,0,0,0.5);
    padding: 8px 12px;
    border-radius: 20px;
    z-index: 2;
}
.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s;
}
.slider-dot.active {
    background: white;
    width: 24px;
    border-radius: 4px;
}
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.45);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    z-index: 2;
    opacity: 0.7;
    transition: opacity 0.2s, background 0.2s;
}
.post-images:hover .slider-arrow,
.slider-arrow:focus {
    opacity: 1;
}
.slider-arrow:hover {
    background: rgba(0,0,0,0.7);
    opacity: 1;
}
.slider-arrow.prev {
    left: 10px;
}
.slider-arrow.next {
    right: 10px;
}
.post-info {
    padding: 15px;
}
.reactions {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-top: 1px solid #eee;
}
.reaction-btn {
    flex: 1;
    padding: 10px;
    background: #f5f5f5;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}
.reaction-btn.active {
    background: #3498db;
    color: white;
}
.share-wrapper {
    position: relative;
    flex: 1;
}
.share-wrapper .share-btn {
    width: 100%;
}
.share-dropdown {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 0 8px rgba(0,0,0,0.12), 0 4px 16px rgba(0,0,0,0.12);
    min-width: 180px;
    z-index: 100;
    overflow: hidden;
}
.share-dropdown.show {
    display: block;
}
.share-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: none;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    white-space: nowrap;
}
.share-dropdown-item:hover {
    background: #f5f5f5;
}
.share-dropdown-item svg {
    flex-shrink: 0;
}
.share-copy-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.share-copy-toast.show {
    opacity: 1;
}
.fit-users {
    display: flex;
    align-items: center;
    padding: 6px 15px 0;
    min-height: 28px;
}
.fit-users-label {
    font-size: 11px;
    color: #999;
    white-space: nowrap;
    margin-right: 6px;
}
.fit-users-icons {
    display: flex;
    align-items: center;
}
.fit-users-icons a {
    display: block;
    line-height: 0;
}
.fit-users-icons a:not(:first-child) {
    margin-left: -6px;
}
.fit-users-icons img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #fff;
    object-fit: cover;
}
.fit-users-more {
    font-size: 12px;
    color: #888;
    margin-left: 6px;
}
.tags {
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.tag {
    padding: 5px 10px;
    background: #ecf0f1;
    border-radius: 15px;
    font-size: 12px;
    text-decoration: none;
    color: #333;
}
.action-buttons {
    padding: 15px;
    display: flex;
    gap: 10px;
}
.edit-btn {
    flex: 1;
    padding: 10px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    display: block;
}
.delete-btn {
    flex: 1;
    padding: 10px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.image-modal.active {
    display: flex;
}
.modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-slider {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}
.modal-image-wrapper {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}
.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 10001;
}
.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}
.modal-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    z-index: 10001;
}
.modal-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
}
.modal-arrow.prev {
    left: 20px;
}
.modal-arrow.next {
    right: 20px;
}
.modal-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 15px;
    border-radius: 20px;
    z-index: 10001;
}
.modal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}
.modal-dot.active {
    background: white;
    width: 30px;
    border-radius: 5px;
}
.post-image {
    cursor: pointer;
}
.post-source-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    background: #fff3e0;
    color: #f57c00;
    margin-top: 8px;
}
/* ━━━ 励ましテキスト（吹き出し） ━━━ */
.detail-encouragement {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 12px 15px;
    padding: 12px 15px;
    background: #e8f4fd;
    border-radius: 12px;
    position: relative;
}
.detail-encouragement-icon {
    font-size: 20px;
    flex-shrink: 0;
    line-height: 1.4;
}
.detail-encouragement p {
    margin: 0;
    font-size: 13px;
    color: #2c6fa0;
    line-height: 1.6;
}
.comment-section {
    background: white;
    overflow: hidden;
}
.comment-header {
    padding: 15px;
    font-size: 16px;
    font-weight: bold;
    border-bottom: 1px solid #eee;
    color: #333;
}
.comment-form {
    padding: 15px;
    border-bottom: 1px solid #eee;
}
.comment-form-inner {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.comment-form-inner img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
}
.comment-input-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.comment-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 44px;
    max-height: 120px;
}
.comment-input:focus {
    outline: none;
    border-color: #3498db;
}
.comment-input-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.comment-reply-label {
    font-size: 12px;
    color: #3498db;
    display: none;
}
.comment-reply-label.visible {
    display: flex;
    align-items: center;
    gap: 4px;
}
.comment-reply-cancel {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 14px;
    padding: 0 4px;
}
.comment-submit-btn {
    padding: 8px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}
.comment-submit-btn:hover {
    background: #2980b9;
}
.comment-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.comment-login-msg {
    padding: 15px;
    text-align: center;
    color: #999;
    font-size: 14px;
    border-bottom: 1px solid #eee;
}
.comment-login-msg a {
    color: #3498db;
}
.comment-affiliate-notice {
    font-size: 11px;
    color: #999;
    padding: 6px 0 0 46px;
}
.comment-list {
    padding: 0;
}
.comment-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.comment-item:last-child {
    border-bottom: none;
}
.comment-item.reply {
    padding-left: 55px;
    background: #fafafa;
}
.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}
.comment-body {
    flex: 1;
    min-width: 0;
}
.comment-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.comment-username {
    font-weight: bold;
    font-size: 13px;
    color: #333;
}
.comment-time {
    font-size: 12px;
    color: #999;
}
.comment-text {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    word-wrap: break-word;
}
.comment-text a,
.post-info a {
    color: #3498db;
    word-break: break-all;
}
.comment-actions {
    margin-top: 4px;
}
.comment-reply-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 12px;
    cursor: pointer;
    padding: 2px 0;
}
.comment-reply-btn:hover {
    color: #3498db;
}
.comment-empty {
    padding: 30px 15px;
    text-align: center;
    color: #999;
    font-size: 14px;
}
.comment-loading {
    padding: 20px;
    text-align: center;
    color: #999;
}
.comment-char-count {
    font-size: 12px;
    color: #999;
}
.comment-char-count.over {
    color: #e74c3c;
}
.comment-image-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 2px 6px;
    cursor: pointer;
    color: #3498db;
    font-size: 16px;
    vertical-align: middle;
    transition: background 0.2s;
}
.comment-image-btn:hover {
    background: #f0f7ff;
}
.comment-image-preview {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.comment-image-preview:empty {
    display: none;
}
.comment-image-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
}
.comment-image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #ddd;
}
.comment-image-preview-item .remove-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e74c3c;
    color: white;
    border: none;
    font-size: 12px;
    cursor: pointer;
    line-height: 20px;
    text-align: center;
    padding: 0;
}
.comment-images {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}
.comment-images img {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid #eee;
    transition: opacity 0.2s;
}
.comment-images img:hover {
    opacity: 0.8;
}
.similar-section {
    background: white;
    padding: 16px;
    border-top: 1px solid #eee;
}
@media (max-width: 599px) {
    .similar-section {
        margin: 10px;
        border-radius: 8px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        border-top: none;
    }
}
.similar-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 12px;
    color: #333;
}
.similar-list {
    display: flex;
    flex-direction: column;
}
.similar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}
.similar-item:last-child {
    border-bottom: none;
}
.similar-item:hover {
    background: #f7f9fa;
    margin: 0 -16px;
    padding: 10px 16px;
    border-radius: 8px;
}
.similar-thumb {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    background: #ddd;
    flex-shrink: 0;
}
.similar-thumb-empty {
    background: #e0e0e0;
}
.similar-thumb-x {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}
.similar-thumb-x svg {
    fill: white;
}
.similar-info {
    flex: 1;
    min-width: 0;
}
.similar-name {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.similar-meta {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}
@media (min-width: 600px) {
    .similar-fit-main,
    .similar-requests-main {
        display: none;
    }
}
.linked-post-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}
.linked-post-banner--green {
    background: #e8f5e9;
    border-bottom-color: #c8e6c9;
}
.linked-post-banner--orange {
    background: #fff3e0;
    border-bottom-color: #ffe0b2;
}
.linked-post-icon {
    font-size: 18px;
    flex-shrink: 0;
}
.linked-post-banner strong {
    display: block;
    margin-bottom: 4px;
}
.linked-post-banner a {
    color: #1565c0;
    text-decoration: none;
}
.linked-post-banner a:hover {
    text-decoration: underline;
}
/* ━━━ 商品リンクカード ━━━ */
.product-links-section {
    padding: 12px 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.product-link-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s, box-shadow 0.2s;
}
.product-link-card:hover {
    background: #f0f4f8;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    text-decoration: none;
}
.product-link-thumb {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #eee;
}
.product-link-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8eef3;
    font-size: 24px;
}
.product-link-info {
    flex: 1;
    min-width: 0;
}
.product-link-label {
    font-size: 11px;
    color: #3498db;
    font-weight: 600;
    margin-bottom: 2px;
}
.product-link-title {
    font-size: 13px;
    font-weight: bold;
    color: #333;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}
.product-link-domain {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}
.product-link-arrow {
    font-size: 20px;
    color: #ccc;
    flex-shrink: 0;
}

.report-action {
    padding: 8px 15px;
    text-align: right;
    border-top: 1px solid #f0f0f0;
}
.report-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
}
.report-btn:hover {
    color: #e74c3c;
}
.report-btn.reported {
    color: #ccc;
    cursor: default;
}
.report-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.report-modal.active {
    display: flex;
}
.report-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 450px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}
.report-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}
.report-modal-header h3 {
    margin: 0;
    font-size: 16px;
}
.report-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
}
.report-modal-body {
    padding: 20px;
}
.report-modal-body > p {
    margin: 0 0 16px;
    font-size: 14px;
    color: #666;
}
.report-category-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border: 2px solid #eee;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: border-color 0.2s;
}
.report-category-option:hover {
    border-color: #ccc;
}
.report-category-option input[type="radio"] {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.report-category-option input[type="radio"]:checked ~ div {
    color: #333;
}
.report-category-option strong {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}
.report-category-option small {
    color: #999;
    font-size: 12px;
}
.report-detail-group {
    margin-top: 16px;
}
.report-detail-group label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
}
.report-detail-group textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    box-sizing: border-box;
}
.report-modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #eee;
}
.report-modal-footer button {
    width: 100%;
    padding: 12px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
}
.report-modal-footer button:disabled {
    background: #ccc;
    cursor: default;
}
.report-modal-footer button:not(:disabled):hover {
    background: #c0392b;
}
