/* css/social_styles.css */

/* ===== LIKE / COMMENT SECTION ===== */
.social-like-section {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #fff;
    border-radius: 12px;
    margin: 12px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    flex-wrap: wrap;
}

.like-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    background: #fff;
    color: #666;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
}
.like-btn:hover {
    border-color: #e74c3c;
    color: #e74c3c;
}
.like-btn.liked {
    background: #e74c3c;
    border-color: #e74c3c;
    color: #fff;
}
.like-btn.liked i {
    animation: heartbeat 0.3s ease;
}
@keyframes heartbeat {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.comment-toggle-btn, .share-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    background: #fff;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}
.comment-toggle-btn:hover { border-color: #3498db; color: #3498db; }
.share-btn:hover { border-color: #2ecc71; color: #2ecc71; }

.social-login-hint {
    margin-left: auto;
    font-size: 13px;
    color: #999;
}
.social-login-hint a { color: #e74c3c; text-decoration: none; }
.social-login-hint a:hover { text-decoration: underline; }

/* ===== KOMMENTAR SEKTION ===== */
.comments-section {
    background: #f9f9f9;
    border-radius: 12px;
    margin: 0 0 16px 0;
    overflow: hidden;
}
.comments-header {
    padding: 12px 16px;
    font-weight: 700;
    color: #333;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 8px;
}
.comment-form {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    align-items: flex-start;
}
.comment-form-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.comment-form-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e74c3c;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
}
.comment-input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.comment-input {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    resize: none;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.comment-input:focus { outline: none; border-color: #e74c3c; }
.comment-submit-btn {
    align-self: flex-end;
    padding: 7px 18px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.comment-submit-btn:hover { background: #c0392b; }

.comments-list { padding: 8px 0; }
.comment-item {
    display: flex;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid #f0f0f0;
}
.comment-item:last-child { border-bottom: none; }
.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.comment-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #3498db;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}
.comment-content { flex: 1; }
.comment-author { font-weight: 700; font-size: 13px; color: #333; }
.comment-text { font-size: 14px; color: #444; margin: 3px 0; }
.comment-time { font-size: 12px; color: #aaa; }

.comment-login-hint {
    padding: 14px 16px;
    color: #888;
    font-size: 14px;
}
.comment-login-hint a { color: #e74c3c; text-decoration: none; font-weight: 600; }
.comment-login-hint a:hover { text-decoration: underline; }
.comments-loading {
    padding: 16px;
    text-align: center;
    color: #aaa;
    font-size: 14px;
}
.no-comments {
    padding: 16px;
    text-align: center;
    color: #bbb;
    font-size: 14px;
}

/* ===== FEED GRID ===== */
.social-feed-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 20px 0;
}
.feed-card {
    background: #fff;
    border-radius: 12px;
    overflow: visible !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: default !important;
    position: relative;
}
.feed-card * {
    pointer-events: auto;
}
.feed-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.feed-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
}
.feed-card-img-placeholder {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #f5f5f5, #eee);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    border-radius: 12px 12px 0 0;
}
.feed-card-body { padding: 12px; }
.feed-card-place { font-size: 13px; color: #e74c3c; font-weight: 600; margin-bottom: 4px; }
.feed-card-comment { font-size: 14px; color: #444; margin-bottom: 8px; line-height: 1.4; max-height: 42px; overflow: hidden; }
.feed-card-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #aaa; }
.feed-card-stats { display: flex; gap: 10px; }
.feed-card-stats span { display: flex; align-items: center; gap: 4px; }

/* ===== LOGIN / REGISTER ===== */
.social-auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    padding: 20px;
}
.social-auth-box {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}
.social-auth-box h2 {
    margin: 0 0 24px 0;
    font-size: 24px;
    color: #222;
    text-align: center;
}
.auth-field {
    margin-bottom: 16px;
}
.auth-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}
.auth-field input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.auth-field input:focus { outline: none; border-color: #e74c3c; }
.auth-submit-btn {
    width: 100%;
    padding: 12px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
}
.auth-submit-btn:hover { background: #c0392b; }
.auth-error {
    background: #ffeaea;
    color: #c0392b;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    text-align: center;
}
.auth-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #888;
}
.auth-link a { color: #e74c3c; text-decoration: none; font-weight: 600; }

/* ===== USER MENU ===== */
.social-user-menu {
    position: relative;
    display: inline-block;
}
.social-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    border-radius: 50px;
    transition: background 0.2s;
}
.social-user-btn:hover { background: #f5f5f5; }
.social-user-avatar-sm {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e74c3c;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}
.social-user-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    min-width: 160px;
    z-index: 1000;
    overflow: hidden;
}
.social-user-dropdown.open { display: block; }
.social-user-dropdown a {
    display: block;
    padding: 11px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s;
}
.social-user-dropdown a:hover { background: #f5f5f5; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .social-feed-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .social-feed-grid { grid-template-columns: repeat(2, 1fr); }
    .social-like-section { gap: 8px; }
    .like-btn, .comment-toggle-btn, .share-btn { padding: 7px 12px; font-size: 13px; }
}
@media (max-width: 480px) {
    .social-feed-grid { grid-template-columns: 1fr; }
    .social-auth-box { padding: 24px; }
}