/* Personal Journey Additional Styles */

/* Post actions menu for edit/delete */
.post-actions-menu {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.locket-post:hover .post-actions-menu {
    opacity: 1;
}

.edit-post-btn,
.delete-post-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #6b7280;
}

.edit-post-btn:hover {
    background-color: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
}

.delete-post-btn:hover {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 800px;
    max-height: 90vh;
    width: 90vw;
    overflow: hidden;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #e5e7eb;
    color: #374151;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    display: flex;
}

.modal-image-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111827;
}

.modal-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.modal-sidebar {
    width: 350px;
    background: white;
    display: flex;
    flex-direction: column;
    border-left: 1px solid #e5e7eb;
}

.modal-post-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-post-content {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-reactions {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.modal-comments {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    max-height: 300px;
}

.comment-item {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
}

.comment-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.comment-author {
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
    margin-bottom: 0.25rem;
}

.comment-text {
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.comment-time {
    font-size: 0.75rem;
    color: #9ca3af;
}

.comment-form {
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.comment-input-group {
    display: flex;
    gap: 0.5rem;
}

.comment-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.comment-input:focus {
    border-color: #ff6b6b;
}

.comment-submit {
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.comment-submit:hover {
    background: #ff5252;
    transform: scale(1.05);
}

.comment-submit:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* Navigation buttons */
.nav-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.nav-btn.active {
    background: rgba(255, 255, 255, 0.3);
}

/* Profile stats */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.stat-card {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: #6b7280;
}

/* Form styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #ff6b6b;
    color: white;
}

.btn-primary:hover {
    background: #ff5252;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Alert messages */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border-left-color: #22c55e;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border-left-color: #ef4444;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border-left-color: #f59e0b;
}

/* Media preview */
.media-preview {
    margin-top: 12px;
    border-radius: 8px;
    overflow: hidden;
    max-width: 100%;
}

.preview-image,
.preview-video {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

/* Avatar hover effect */
.profile-avatar-container {
    position: relative;
}

.profile-avatar-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    cursor: pointer;
    border-radius: 50%;
}

.profile-avatar-container:hover .profile-avatar-overlay {
    opacity: 1;
}

/* Toast notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    color: #374151;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    z-index: 1100;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
    border-left: 4px solid #ff6b6b;
}

.toast.show {
    transform: translateX(0);
}

.toast.toast-success {
    border-left-color: #10b981;
}

.toast.toast-error {
    border-left-color: #ef4444;
}

.toast.toast-warning {
    border-left-color: #f59e0b;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .post-actions-menu {
        opacity: 1; /* Always show on mobile */
    }
    
    .nav-buttons {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    
    .nav-btn {
        width: 100%;
        text-align: center;
    }
    
    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-number {
        font-size: 20px;
    }
    
    .form-input {
        padding: 10px 12px;
    }
    
    .btn {
        padding: 10px 20px;
        width: 100%;
    }
    
    .modal-content {
        width: 100vw;
        height: 100vh;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }

    .modal-body {
        flex-direction: column;
    }

    .modal-image-section {
        height: 60vh;
    }

    .modal-sidebar {
        width: 100%;
        height: 40vh;
    }

    .modal-comments {
        max-height: 200px;
    }
    
    .toast {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100%);
    }

    .toast.show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .edit-post-btn,
    .delete-post-btn {
        padding: 12px;
        font-size: 16px;
    }
    
    .profile-stats {
        grid-template-columns: 1fr;
    }
}