

/* ========================================
   コメント編集ボタン
   ======================================== */

.cef-comment-wrapper {
    position: relative;
}

.cef-edit-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.cef-edit-button {
    display: inline-block;
    padding: 6px 16px;
    background-color: #fa761e;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.cef-edit-button:hover {
    background-color: #e56510;
}

.cef-edit-button:focus {
    outline: 2px solid #fa761e;
    outline-offset: 2px;
}

.cef-edit-info {
    font-size: 13px;
    color: #666;
}

.cef-edit-limit-reached {
    margin-top: 8px;
    color: #999;
    font-style: italic;
}

/* ========================================
   いいねボタン
   ======================================== */

.cef-like-area {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.cef-like-button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: none;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
    line-height: 1.4;
}

.cef-like-button:hover:not(:disabled) {
    border-color: #e74c3c;
    color: #e74c3c;
    background-color: #fdf2f2;
}

.cef-like-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cef-like-button.cef-liked {
    border-color: #e74c3c;
    color: #e74c3c;
    background-color: #fdf2f2;
}

.cef-like-button.cef-like-processing {
    pointer-events: none;
    opacity: 0.7;
}

.cef-like-icon {
    font-size: 16px;
    line-height: 1;
    display: inline-block;
    transition: transform 0.2s ease;
}

/* グッジョブ・チェックは絵文字サイズ調整 */
.cef-icon-thumbsup .cef-like-icon,
.cef-icon-check .cef-like-icon {
    font-size: 15px;
}

.cef-like-pop {
    animation: cef-heart-pop 0.3s ease;
}

@keyframes cef-heart-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* アイコンタイプ別のアクティブ色 */
.cef-like-button.cef-liked.cef-icon-heart {
    border-color: #e74c3c;
    color: #e74c3c;
    background-color: #fdf2f2;
}

.cef-like-button:hover:not(:disabled).cef-icon-heart {
    border-color: #e74c3c;
    color: #e74c3c;
    background-color: #fdf2f2;
}

.cef-like-button.cef-liked.cef-icon-thumbsup {
    border-color: #3498db;
    color: #3498db;
    background-color: #eaf4fd;
}

.cef-like-button:hover:not(:disabled).cef-icon-thumbsup {
    border-color: #3498db;
    color: #3498db;
    background-color: #eaf4fd;
}

.cef-like-button.cef-liked.cef-icon-check {
    border-color: #27ae60;
    color: #27ae60;
    background-color: #eafaf1;
}

.cef-like-button:hover:not(:disabled).cef-icon-check {
    border-color: #27ae60;
    color: #27ae60;
    background-color: #eafaf1;
}

.cef-like-count {
    font-size: 13px;
    font-weight: 500;
    min-width: 8px;
}

.cef-like-users {
    font-size: 12px;
    color: #888;
    cursor: pointer;
    transition: color 0.2s ease;
}

.cef-like-users:hover {
    color: #555;
    text-decoration: underline;
}

/* いいねユーザー一覧モーダル */
.cef-like-users-modal-content {
    max-width: 400px;
}

.cef-like-users-full-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cef-like-users-full-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.cef-like-users-full-list li:last-child {
    border-bottom: none;
}

.cef-like-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ========================================
   モーダル共通
   ======================================== */

.cef-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    overflow: auto;
}

.cef-modal-content {
    position: relative;
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: cef-slide-down 0.3s ease;
}

@keyframes cef-slide-down {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cef-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
}

.cef-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.cef-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    font-weight: 300;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    line-height: 1;
    transition: color 0.2s ease;
}

.cef-modal-close:hover {
    color: #333;
}

.cef-modal-body {
    padding: 24px;
}

#cef-comment-textarea {
    width: 95%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.6;
    resize: vertical;
    min-height: 150px;
    transition: border-color 0.2s ease;
}

#cef-comment-textarea:focus {
    outline: none;
    border-color: #fa761e;
    box-shadow: 0 0 0 1px #fa761e;
}

/* メッセージ */
.cef-message {
    display: none;
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
}

.cef-message-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.cef-message-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* モーダルフッター */
.cef-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #e0e0e0;
    background-color: #f8f9fa;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.cef-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cef-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cef-btn-cancel {
    background-color: #f1f1f1;
    color: #333;
}

.cef-btn-cancel:hover:not(:disabled) {
    background-color: #e0e0e0;
}

.cef-btn-save {
    background-color: #fa761e;
    color: #fff;
}

.cef-btn-save:hover:not(:disabled) {
    background-color: #e56510;
}

/* 編集済みマーク */
.cef-edited-note {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
}

.cef-edited-note em {
    font-style: italic;
}

/* Cloudflare Turnstile */
.cef-turnstile-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 16px;
    min-height: 65px;
}

/* ========================================
   レスポンシブ対応
   ======================================== */

@media (max-width: 768px) {
    .cef-modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .cef-modal-header,
    .cef-modal-body,
    .cef-modal-footer {
        padding: 16px;
    }
    
    .cef-modal-header h3 {
        font-size: 18px;
    }
    
    #cef-comment-textarea {
        font-size: 16px; /* iOSのズーム防止 */
    }
}

@media (max-width: 480px) {
    .cef-modal-footer {
        flex-direction: column;
    }
    
    .cef-btn {
        width: 100%;
    }
    
    .cef-like-area {
        gap: 6px;
    }
}

