/**
 * Diary Module Styles
 * 日記模組專用樣式
 */

/* ========================================
   Diary Avatar
======================================== */
.diary-avatar-link {
    display: block;
    flex-shrink: 0;
}

.diary-avatar-placeholder {
    background: linear-gradient(135deg, var(--paws-primary) 0%, var(--paws-primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.diary-avatar-placeholder .material-icons {
    font-size: 24px;
}

/* ========================================
   Diary Header Info
======================================== */
.diary-petname-link {
    color: inherit;
    text-decoration: none;
}

.diary-petname-link:hover {
    text-decoration: none;
}

/* Pet Age Tag (寵物歲數標籤) */
.diary-pet-age {
    font-size: 0.75rem;
    font-weight: 500;
    color: #9CA3AF;
    background: #F3F4F6;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}

/* ========================================
   Diary Atmosphere (心情與天氣)
======================================== */
.diary-atmosphere {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 16px 10px;
}

.atmosphere-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    font-size: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.atmosphere-emoji {
    font-size: 18px;
    line-height: 1;
}

.atmosphere-label {
    font-weight: 500;
    color: #92400E;
}

/* 心情標籤 */
.mood-tag {
    background: rgba(255, 255, 255, 0.9);
}

/* 天氣標籤 */
.weather-tag {
    background: rgba(255, 255, 255, 0.9);
}

.weather-tag .atmosphere-label {
    color: #1E40AF;
}

/* ========================================
   Diary Dropdown Menu
======================================== */
.diary-dropdown {
    position: relative;
}

.diary-more-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.diary-more-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.diary-more-btn .material-icons {
    font-size: 20px;
    color: var(--paws-text-secondary);
}

.diary-dropdown .uk-dropdown {
    min-width: 140px;
    padding: 6px 0;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.diary-dropdown .uk-dropdown-nav {
    margin: 0;
}

.diary-dropdown .uk-dropdown-nav > li > a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--paws-text);
    transition: all 0.15s ease;
}

.diary-dropdown .uk-dropdown-nav > li > a .material-icons {
    font-size: 18px;
    color: var(--paws-text-secondary);
}

.diary-dropdown .uk-dropdown-nav > li > a:hover {
    color: var(--paws-primary);
    background: var(--paws-bg);
}

.diary-dropdown .uk-dropdown-nav > li > a:hover .material-icons {
    color: var(--paws-primary);
}

.diary-dropdown .uk-nav-divider {
    margin: 6px 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.delete-diary-btn,
.delete-diary-btn .material-icons {
    color: #ef4444 !important;
}

.delete-diary-btn:hover {
    color: #dc2626 !important;
    background: #fef2f2 !important;
}

/* ========================================
   Diary Content
======================================== */
.diary-text {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.diary-text p {
    margin: 0 0 0.5em 0;
}

.diary-text p:last-child {
    margin-bottom: 0;
}

.diary-text a {
    color: var(--paws-primary);
    text-decoration: underline;
}

.diary-text a:hover {
    color: var(--paws-primary-dark, #E5A340);
}

/* 嵌入影片 (YouTube 等) */
.diary-text iframe,
.diary-content iframe,
.diary-view-content iframe {
    max-width: 100%;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 12px;
    margin: 12px 0;
    border: none;
}

/* ========================================
   TinyMCE Sticky Toolbar
======================================== */
.mce-toolbar-grp {
    background: #fff !important;
    transition: box-shadow 0.2s ease;
}

/* 固定狀態時的樣式 */
.mce-tinymce .mce-toolbar-grp[style*="position: fixed"] {
    background: #fff !important;
    border-bottom: 1px solid #e2e8f0;
}

/* 確保 TinyMCE 容器不會 overflow hidden 影響 sticky */
.mce-tinymce {
    overflow: visible !important;
}

.mce-edit-area {
    border-radius: 0 0 12px 12px;
}

/* 地點區塊容器 */
.diary-location-wrap {
    padding: 0 16px 12px;
}

.diary-location-wrap .diary-place-card {
    margin-top: 0;
}

.diary-location-wrap .diary-location {
    margin-top: 0;
}

.diary-location {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    font-size: .9rem;
    color: var(--paws-text-muted);
}

.diary-location .material-icons {
    font-size: 16px;
    color: var(--paws-primary);
}

.diary-location .location-link {
    color: var(--paws-primary);
    text-decoration: none;
}

.diary-location .location-link:hover {
    text-decoration: underline;
}

/* ========================================
   Diary Place Card (地點預覽卡片)
======================================== */
.diary-place-card {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding: 10px 12px;
    background: var(--paws-bg);
    border: 1px solid var(--paws-border);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.diary-place-card:hover {
    background: var(--paws-card);
    border-color: var(--paws-primary);
    text-decoration: none;
}

.place-card-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.place-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.place-card-thumb-placeholder {
    background: linear-gradient(135deg, var(--paws-primary-light) 0%, var(--paws-primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.place-card-thumb-placeholder .material-icons {
    font-size: 24px;
    color: white;
}

.place-card-info {
    flex: 1;
    min-width: 0;
}

.place-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--paws-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.place-card-address {
    font-size: 12px;
    color: var(--paws-text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.place-card-chevron {
    font-size: 20px;
    color: var(--paws-text-muted);
    flex-shrink: 0;
}

/* ========================================
   Care Record Card (in diary feed)
======================================== */
.diary-care-wrap {
    padding: 0 16px 12px;
}

.diary-care-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--paws-bg);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.diary-care-card:hover {
    background: var(--paws-card);
    border: 1px solid #059669;
    text-decoration: none;
}

.diary-care-card .care-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.diary-care-card .care-card-icon span {
    font-size: 20px;
}

.diary-care-card .care-card-info {
    flex: 1;
    min-width: 0;
}

.diary-care-card .care-card-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--paws-text);
}

.diary-care-card .care-card-detail {
    font-size: 12px;
    color: var(--paws-text-secondary);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.diary-care-card .care-card-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--paws-text-muted);
    margin-top: 3px;
}

.diary-care-card .care-card-meta .material-icons {
    font-size: 12px;
}

.diary-care-card .care-card-chevron {
    font-size: 18px;
    color: var(--paws-text-muted);
    flex-shrink: 0;
}

/* ========================================
   Video Placeholder (Small)
======================================== */
.video-placeholder-sm {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    width: 100%;
    height: 100%;
    aspect-ratio: 1;
}

.video-placeholder-sm .material-icons {
    font-size: 48px;
}

/* ========================================
   Empty Feed
======================================== */
.empty-feed .btn-create-diary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    padding: 12px 24px;
    background: var(--paws-primary);
    color: white;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.empty-feed .btn-create-diary:hover {
    background: var(--paws-primary-dark, #00897b);
}

.empty-feed .btn-create-diary .material-icons {
    font-size: 20px;
    color: white;
    margin-bottom: 0;
}

/* ========================================
   Diary List Section (Profile Page)
======================================== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.section-header .section-title {
    margin: 0;
    font-size: 15px;
}

.add-diary-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: var(--paws-primary);
    color: white;
    border-radius: 18px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.add-diary-btn:hover {
    background: var(--paws-primary-dark, #E5A340);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 189, 89, 0.3);
}

.add-diary-btn .material-icons {
    font-size: 18px;
}

.diaries-list {
    display: flex;
    flex-direction: column;
}

/* Month Separator */
.month-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 0;
    position: relative;
    margin: 10px 0;
}

.month-separator:first-child {
    margin-top: 0;
}

/* 手繪圈起來效果 - 三筆不同角度 */
.month-separator::before,
.month-separator::after {
    content: '';
    position: absolute;
    pointer-events: none;
}

/* 第一筆 */
.month-separator::before {
    top: 4px;
    left: 50%;
    transform: translateX(-50%) rotate(-2.5deg);
    width: 136px;
    height: 32px;
    border: 1.5px solid rgba(180, 160, 140, 0.32);
    border-radius: 55% 45% 50% 50% / 60% 55% 50% 55%;
}

/* 第二筆 */
.month-separator::after {
    top: 7px;
    left: 50%;
    transform: translateX(-48%) rotate(2deg);
    width: 130px;
    height: 26px;
    border: 1.5px solid rgba(165, 145, 125, 0.28);
    border-radius: 45% 55% 50% 45% / 50% 60% 55% 50%;
}

.month-label {
    font-size: 17px;
    font-weight: 700;
    color: var(--paws-text, #333);
    white-space: nowrap;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

/* 第三筆 */
.month-label::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%) rotate(0.5deg);
    width: 140px;
    height: 34px;
    border: 1.5px solid rgba(170, 150, 130, 0.22);
    border-radius: 50% 48% 52% 48% / 55% 50% 55% 50%;
    pointer-events: none;
}

.month-count {
    font-size: 13px;
    color: var(--paws-text-muted, #888);
    background: var(--paws-bg, #f5f5f5);
    padding: 3px 10px;
    border-radius: 12px;
    position: relative;
    z-index: 1;
}

.month-line {
    display: none;
}

.empty-diaries .btn-create-diary {
    display: inline-block;
    margin-top: 16px;
    padding: 10px 24px;
    background: var(--paws-primary);
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.empty-diaries .btn-create-diary:hover {
    background: var(--paws-primary-dark, #00897b);
}

/* Load More */
.load-more {
    text-align: center;
    padding: 20px 0;
}

.load-more-btn {
    padding: 12px 32px;
    background: var(--paws-bg);
    color: var(--paws-text);
    border: 1px solid var(--paws-border);
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.load-more-btn:hover {
    background: var(--paws-card);
}

/* ========================================
   Diary Post/Edit Page Styles
======================================== */
.diary-post-page {
    margin: 0 auto;
    padding: 16px;
    padding-bottom: calc(var(--bottom-nav-height) + 80px);
}

.diary-post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--paws-border);
}

.diary-post-header h1 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.diary-back-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--paws-text-secondary);
    font-size: 14px;
}

.diary-back-btn .material-icons {
    font-size: 20px;
}

/* Pet Selector */
.pet-selector {
    margin-bottom: 20px;
}

.pet-selector-label {
    font-size: 13px;
    color: var(--paws-text-muted);
    margin-bottom: 8px;
}

.pet-selector-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 0;
    -webkit-overflow-scrolling: touch;
}

.pet-selector-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    flex-shrink: 0;
}

.pet-selector-item .pet-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid transparent;
    transition: border-color 0.2s;
}

.pet-selector-item.selected .pet-avatar {
    border-color: var(--paws-primary);
}

.pet-selector-item .pet-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pet-selector-item .pet-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--paws-primary) 0%, var(--paws-primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.pet-selector-item .pet-avatar-placeholder .material-icons {
    font-size: 28px;
}

.pet-selector-item .pet-name {
    font-size: 12px;
    color: var(--paws-text-secondary);
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

.pet-selector-item.selected .pet-name {
    color: var(--paws-primary);
    font-weight: 500;
}

/* Content Input */
.diary-content-input {
    margin-bottom: 20px;
}

.diary-content-input textarea {
    width: 100%;
    min-height: 150px;
    border: none;
    background: var(--paws-card);
    border-radius: 12px;
    padding: 16px;
    font-size: 16px;
    line-height: 1.6;
    resize: none;
    color: var(--paws-text);
}

.diary-content-input textarea::placeholder {
    color: var(--paws-text-muted);
}

.diary-content-input textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--paws-primary-light);
}

.char-count {
    text-align: right;
    font-size: 12px;
    color: var(--paws-text-muted);
    margin-top: 8px;
}

.char-count.warning {
    color: #f59e0b;
}

.char-count.error {
    color: #ef4444;
}

/* Media Upload */
.diary-media-section {
    margin-bottom: 20px;
}

.media-upload-area {
    background: var(--paws-card);
    border: 2px dashed var(--paws-border);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.media-upload-area:hover {
    border-color: var(--paws-primary);
    background: var(--paws-bg);
}

.media-upload-area .material-icons {
    font-size: 48px;
    color: var(--paws-text-muted);
}

.media-upload-area p {
    color: var(--paws-text-secondary);
    margin: 12px 0 0;
    font-size: 14px;
}

.media-upload-area .upload-hint {
    font-size: 12px;
    color: var(--paws-text-muted);
    margin-top: 4px;
}

/* Media Preview Grid */
.media-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.media-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
}

.media-preview-item img,
.media-preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-preview-item .remove-media-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-preview-item .remove-media-btn .material-icons {
    font-size: 16px;
}

.media-preview-item .video-indicator {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.media-preview-item .video-indicator .material-icons {
    font-size: 14px;
}

/* Diary Options */
.diary-options {
    background: var(--paws-card);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

.diary-option-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--paws-border);
    cursor: pointer;
}

.diary-option-item:last-child {
    border-bottom: none;
}

.diary-option-item .option-icon {
    width: 36px;
    height: 36px;
    background: var(--paws-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.diary-option-item .option-icon .material-icons {
    font-size: 20px;
    color: var(--paws-primary);
}

.diary-option-item .option-content {
    flex: 1;
}

.diary-option-item .option-label {
    font-size: 14px;
    color: var(--paws-text);
}

.diary-option-item .option-value {
    font-size: 13px;
    color: var(--paws-text-muted);
    margin-top: 2px;
}

.diary-option-item .option-arrow {
    color: var(--paws-text-muted);
}

/* Mood & Weather Selectors */
.mood-selector,
.weather-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 0;
}

.mood-item,
.weather-item {
    padding: 8px 16px;
    background: var(--paws-bg);
    border: 2px solid transparent;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.mood-item:hover,
.weather-item:hover {
    background: var(--paws-card);
}

.mood-item.selected,
.weather-item.selected {
    border-color: var(--paws-primary);
    background: var(--paws-primary-light);
}

/* Tags Input */
.tags-input-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    background: var(--paws-bg);
    border-radius: 8px;
    min-height: 44px;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--paws-primary);
    color: white;
    border-radius: 16px;
    font-size: 13px;
}

.tag-chip .remove-tag {
    cursor: pointer;
    opacity: 0.8;
}

.tag-chip .remove-tag:hover {
    opacity: 1;
}

.tags-input-container input {
    flex: 1;
    min-width: 100px;
    border: none;
    background: transparent;
    font-size: 14px;
    padding: 6px;
    color: var(--paws-text);
}

.tags-input-container input:focus {
    outline: none;
}

/* Privacy Selector */
.privacy-options {
    padding: 8px 0;
}

.privacy-option {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.privacy-option:hover {
    background: var(--paws-bg);
}

.privacy-option.selected {
    background: var(--paws-primary-light);
}

.privacy-option .privacy-icon {
    width: 40px;
    height: 40px;
    background: var(--paws-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.privacy-option.selected .privacy-icon {
    background: var(--paws-primary);
    color: white;
}

.privacy-option .privacy-icon .material-icons {
    font-size: 20px;
}

.privacy-option .privacy-info {
    flex: 1;
}

.privacy-option .privacy-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--paws-text);
}

.privacy-option .privacy-desc {
    font-size: 12px;
    color: var(--paws-text-muted);
    margin-top: 2px;
}

.privacy-option .privacy-check {
    color: var(--paws-primary);
    display: none;
}

.privacy-option.selected .privacy-check {
    display: block;
}

/* Post Actions */
.diary-post-actions {
    position: fixed;
    bottom: var(--bottom-nav-height);
    left: 0;
    right: 0;
    background: var(--paws-card);
    padding: 12px 16px;
    display: flex;
    gap: 12px;
    border-top: 1px solid var(--paws-border);
    z-index: 100;
}

.diary-post-actions .btn {
    flex: 1;
    padding: 14px;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.diary-post-actions .btn-draft {
    background: var(--paws-bg);
    color: var(--paws-text);
}

.diary-post-actions .btn-publish {
    background: var(--paws-primary);
    color: white;
}

.diary-post-actions .btn-publish:disabled {
    background: var(--paws-border);
    color: var(--paws-text-muted);
    cursor: not-allowed;
}

/* Delete Diary Button (Edit Page) */
.diary-danger-zone {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--paws-border);
}

.btn-delete-diary {
    width: 100%;
    padding: 14px;
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #fecaca;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-delete-diary:hover {
    background: #fee2e2;
}

.btn-delete-diary .material-icons {
    font-size: 20px;
}

/* ========================================
   Diary Participants (多寵物標記)
======================================== */
.diary-participants {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--paws-bg);
    border-radius: 8px;
    margin: 0 12px 8px;
    font-size: 13px;
}

.participants-label {
    color: var(--paws-text-muted);
}

.participant-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: white;
    border-radius: 20px;
    color: var(--paws-text);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--paws-border);
    transition: all 0.2s;
}

.participant-tag:hover {
    border-color: var(--paws-primary);
    background: rgba(255, 189, 89, 0.1);
}

.participant-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
}

.participant-owner {
    background: linear-gradient(135deg, rgba(255, 189, 89, 0.15), rgba(255, 206, 128, 0.15));
    border-color: rgba(255, 189, 89, 0.3);
}

.participant-owner .material-icons {
    font-size: 14px;
    color: var(--paws-primary);
}

.participant-user {
    background: #ede9fe;
    border-color: #c4b5fd;
    color: #6d28d9;
}

.participant-user:hover {
    background: #ddd6fe;
}

.participant-user .material-icons {
    font-size: 14px;
    color: #6d28d9;
}

/* ========================================
   AI Assist Button
======================================== */
.ai-assist-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #FFBD59, #FFCE80);
    border: none;
    border-radius: 18px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(255, 189, 89, 0.3);
}

.ai-assist-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 189, 89, 0.4);
}

.ai-assist-btn .material-icons {
    font-size: 16px;
}

/* ========================================
   Diary Card - Compact Mode (管理用)
======================================== */
.diary-card-compact {
    background: var(--paws-card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.diary-card-compact[data-status="draft"] {
    border-left: 3px solid #f59e0b;
}

.diary-card-compact .diary-card-inner {
    display: block;
    padding: 16px;
    color: inherit;
    text-decoration: none;
}

.diary-card-compact .diary-card-inner:hover {
    text-decoration: none;
}

/* Compact Header */
.diary-compact-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.diary-compact-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--paws-primary) 0%, var(--paws-primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.diary-compact-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.diary-compact-avatar .material-icons {
    font-size: 18px;
    color: white;
}

.diary-compact-avatar.owner-avatar {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.diary-compact-names {
    flex: 1;
    min-width: 0;
}

.diary-compact-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--paws-text);
}

.diary-draft-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

/* Compact Content */
.diary-compact-content {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.diary-compact-thumb {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.diary-compact-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.diary-compact-media-count {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
}

.diary-compact-text {
    flex: 1;
    font-size: 14px;
    color: var(--paws-text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Compact Location */
.diary-compact-location {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--paws-primary);
}

.diary-compact-location .material-icons {
    font-size: 14px;
}

.diary-compact-location .location-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* Compact Meta */
.diary-compact-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--paws-text-muted);
}

.diary-compact-date {
    display: flex;
    align-items: center;
    gap: 4px;
}

.diary-compact-date .material-icons {
    font-size: 14px;
}

.diary-compact-stats {
    display: flex;
    gap: 12px;
}

.diary-compact-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 2px;
}

.diary-compact-stats .stat-item .material-icons {
    font-size: 14px;
}
