/* Users Articles Info Component Styles */
/* Πληροφορίες από την κοινότητα για άρθρα/τοποθεσίες */

/* =============================================
   Container & Base Styles
   ============================================= */
.user-info-wrapper {
    margin-top: 0;
}

.user-info-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.user-info-header h4 {
    margin: 0;
    font-weight: 600;
    color: #212529;
}

.user-info-count {
    font-weight: normal;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Dark mode support */
.dark .user-info-header h4 {
    color: #e5e7eb;
}

.dark .user-info-count {
    color: #9ca3af;
}

/* =============================================
   Add Info Button
   ============================================= */
.btn-add-user-info {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #fff;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.btn-add-user-info:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.btn-add-user-info:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.btn-add-user-info i {
    font-size: 1rem;
}

.dark .btn-add-user-info {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.3);
}

.dark .btn-add-user-info:hover {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.4);
}

/* =============================================
   User Info List
   ============================================= */
.user-info-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.user-info-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.user-info-item:hover {
    background: #f8fafc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.user-info-item.newly-added {
    animation: userInfoFlashNew 1.5s ease;
}

@keyframes userInfoFlashNew {
    0% { background: #dbeafe; border-color: #93c5fd; }
    100% { background: #fff; border-color: #e5e7eb; }
}

.dark .user-info-item {
    background: #1f2937;
    border-color: #374151;
}

.dark .user-info-item:hover {
    background: #263042;
}

.dark .user-info-item.newly-added {
    animation: userInfoFlashNewDark 1.5s ease;
}

@keyframes userInfoFlashNewDark {
    0% { background: #1e3a5f; border-color: #3b82f6; }
    100% { background: #1f2937; border-color: #374151; }
}

/* =============================================
   User Avatar
   ============================================= */
.user-info-avatar {
    flex-shrink: 0;
}

.user-info-avatar a {
    display: block;
    text-decoration: none;
}

.user-info-avatar-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
    transition: border-color 0.2s ease;
}

.user-info-avatar a:hover .user-info-avatar-img {
    border-color: #3b82f6;
}

.user-info-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e5e7eb;
    transition: border-color 0.2s ease;
}

.user-info-avatar a:hover .user-info-avatar-placeholder {
    border-color: #3b82f6;
}

.user-info-avatar-placeholder i {
    font-size: 1.5rem;
    color: #6b7280;
}

.dark .user-info-avatar-img {
    border-color: #4b5563;
}

.dark .user-info-avatar-placeholder {
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
    border-color: #4b5563;
}

.dark .user-info-avatar-placeholder i {
    color: #9ca3af;
}

/* =============================================
   User Info Content
   ============================================= */
.user-info-content {
    flex-grow: 1;
    min-width: 0;
}

.user-info-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.user-info-author {
    font-weight: 600;
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s ease;
}

.user-info-author:hover {
    color: #3b82f6;
}

.user-info-date {
    font-size: 0.8rem;
    color: #6b7280;
}

.user-info-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 500;
    border-radius: 9999px;
}

.user-info-badge-verified {
    background: #dcfce7;
    color: #166534;
}

.user-info-badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.dark .user-info-author {
    color: #e5e7eb;
}

.dark .user-info-author:hover {
    color: #60a5fa;
}

.dark .user-info-date {
    color: #9ca3af;
}

.dark .user-info-badge-verified {
    background: #14532d;
    color: #86efac;
}

.dark .user-info-badge-pending {
    background: #78350f;
    color: #fcd34d;
}

/* =============================================
   User Info Body/Text
   ============================================= */
.user-info-body {
    color: #374151;
    font-size: 0.95rem;
    line-height: 1.6;
    word-break: break-word;
}

.user-info-body p {
    margin: 0 0 0.5rem 0;
}

.user-info-body p:last-child {
    margin-bottom: 0;
}

.user-info-body a {
    color: #3b82f6;
    text-decoration: underline;
}

.user-info-body a:hover {
    color: #1d4ed8;
}

.dark .user-info-body {
    color: #d1d5db;
}

.dark .user-info-body a {
    color: #60a5fa;
}

.dark .user-info-body a:hover {
    color: #93c5fd;
}

/* =============================================
   User Info Body Collapsible (Read More)
   ============================================= */
.user-info-body-collapsible {
    position: relative;
    max-height: 150px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.user-info-body-collapsible.expanded {
    max-height: none;
}

.user-info-body-content {
    color: #374151;
    font-size: 0.95rem;
    line-height: 1.6;
    word-break: break-word;
}

.user-info-body-content p {
    margin: 0 0 0.5rem 0;
}

.user-info-body-content p:last-child {
    margin-bottom: 0;
}

.user-info-body-content a {
    color: #3b82f6;
    text-decoration: underline;
}

.user-info-body-content a:hover {
    color: #1d4ed8;
}

.user-info-body-fade {
    display: none;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 1));
    pointer-events: none;
    z-index: 1;
}

.user-info-body-collapsible.has-overflow .user-info-body-fade {
    display: block;
}

.user-info-body-collapsible.expanded .user-info-body-fade {
    display: none;
}

.user-info-read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.5rem;
    padding: 0;
    font-size: 0.85rem;
    color: #3b82f6;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

.user-info-read-more-btn:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.dark .user-info-body-content {
    color: #d1d5db;
}

.dark .user-info-body-content a {
    color: #60a5fa;
}

.dark .user-info-body-content a:hover {
    color: #93c5fd;
}

.dark .user-info-body-fade {
    background: linear-gradient(to bottom, transparent, rgba(31, 41, 55, 0.95), rgba(31, 41, 55, 1));
}

.dark .user-info-read-more-btn {
    color: #60a5fa;
}

.dark .user-info-read-more-btn:hover {
    color: #93c5fd;
}

/* =============================================
   Pagination
   ============================================= */
.user-info-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.user-info-page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 1rem;
    color: #4b5563;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-info-page-btn:hover:not(:disabled) {
    background: #e5e7eb;
    color: #1f2937;
}

.user-info-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.user-info-page-info {
    font-size: 0.875rem;
    color: #6b7280;
}

.dark .user-info-pagination {
    border-top-color: #4b5563;
}

.dark .user-info-page-btn {
    color: #9ca3af;
    background: #374151;
    border-color: #4b5563;
}

.dark .user-info-page-btn:hover:not(:disabled) {
    background: #4b5563;
    color: #e5e7eb;
}

.dark .user-info-page-info {
    color: #9ca3af;
}

/* =============================================
   Show More/Less Toggle
   ============================================= */
.user-info-toggle-section {
    margin-top: 1rem;
    text-align: center;
}

.user-info-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: #4b5563;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-info-toggle-btn:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.dark .user-info-toggle-btn {
    color: #9ca3af;
    background: #374151;
    border-color: #4b5563;
}

.dark .user-info-toggle-btn:hover {
    background: #4b5563;
    color: #e5e7eb;
}

.user-info-hidden {
    display: none !important;
}

/* =============================================
   Empty State
   ============================================= */
.user-info-empty {
    text-align: center;
    padding: 2rem;
    background: #f8fafc;
    border: 2px dashed #e5e7eb;
    border-radius: 0.75rem;
}

.user-info-empty i {
    font-size: 2.5rem;
    color: #9ca3af;
    margin-bottom: 0.75rem;
}

.user-info-empty p {
    margin: 0;
    color: #6b7280;
    font-size: 0.95rem;
}

.user-info-empty .user-info-empty-cta {
    margin-top: 1rem;
    color: #3b82f6;
    font-weight: 500;
}

.dark .user-info-empty {
    background: #1f2937;
    border-color: #374151;
}

.dark .user-info-empty i {
    color: #6b7280;
}

.dark .user-info-empty p {
    color: #9ca3af;
}

.dark .user-info-empty .user-info-empty-cta {
    color: #60a5fa;
}

/* =============================================
   Modal Styles
   ============================================= */
.user-info-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 1rem;
}

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

.user-info-modal {
    background: #fff;
    border-radius: 1rem;
    width: 100%;
    max-width: 700px;
    max-height: 85vh;
    min-height: 500px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.user-info-modal form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.user-info-modal-overlay.active .user-info-modal {
    transform: scale(1) translateY(0);
}

.dark .user-info-modal {
    background: #1f2937;
}

.user-info-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.user-info-modal-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
}

.dark .user-info-modal-header {
    border-color: #374151;
}

.dark .user-info-modal-header h3 {
    color: #e5e7eb;
}

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

.user-info-modal-close:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.dark .user-info-modal-close {
    background: #374151;
    color: #9ca3af;
}

.dark .user-info-modal-close:hover {
    background: #4b5563;
    color: #e5e7eb;
}

.user-info-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    min-height: 0;
}

/* Ensure text editor doesn't overflow */
.user-info-modal-body .text-editor-component {
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

.user-info-modal-body .text-editor-area {
    flex: 1;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
}

.user-info-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    flex-shrink: 0;
}

.dark .user-info-modal-footer {
    border-color: #374151;
    background: #111827;
}

/* =============================================
   Form Styles
   ============================================= */
.user-info-form-group {
    margin-bottom: 1rem;
}

.user-info-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.dark .user-info-form-group label {
    color: #d1d5db;
}

.user-info-form-hint {
    margin-top: 0.375rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.dark .user-info-form-hint {
    color: #9ca3af;
}

.user-info-textarea {
    width: 100%;
    min-height: 150px;
    padding: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #1f2937;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.user-info-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.user-info-textarea::placeholder {
    color: #9ca3af;
}

.dark .user-info-textarea {
    background: #111827;
    border-color: #4b5563;
    color: #e5e7eb;
}

.dark .user-info-textarea:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.dark .user-info-textarea::placeholder {
    color: #6b7280;
}

/* =============================================
   Form Buttons
   ============================================= */
.btn-user-info-cancel {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-user-info-cancel:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.dark .btn-user-info-cancel {
    background: #374151;
    border-color: #4b5563;
    color: #9ca3af;
}

.dark .btn-user-info-cancel:hover {
    background: #4b5563;
    color: #e5e7eb;
}

.btn-user-info-submit {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #fff;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-user-info-submit:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.btn-user-info-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-user-info-submit.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn-user-info-submit.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: userInfoSpin 0.8s linear infinite;
}

@keyframes userInfoSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =============================================
   Character Counter
   ============================================= */
.user-info-char-counter {
    text-align: right;
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.user-info-char-counter.warning {
    color: #f59e0b;
}

.user-info-char-counter.danger {
    color: #ef4444;
}

.dark .user-info-char-counter {
    color: #9ca3af;
}

/* =============================================
   Toast Notifications
   ============================================= */
.user-info-toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 10000;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.user-info-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.user-info-toast-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.user-info-toast-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.user-info-toast-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.dark .user-info-toast-success {
    background: #14532d;
    color: #86efac;
    border-color: #22c55e;
}

.dark .user-info-toast-error {
    background: #7f1d1d;
    color: #fca5a5;
    border-color: #ef4444;
}

.dark .user-info-toast-info {
    background: #1e3a8a;
    color: #93c5fd;
    border-color: #3b82f6;
}

/* =============================================
   Pagination
   ============================================= */
.user-info-pagination {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 1.5rem;
}

.user-info-pagination .page-link {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    color: #4b5563;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.user-info-pagination .page-link:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.user-info-pagination .page-item.active .page-link {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

.user-info-pagination .page-item.disabled .page-link {
    color: #9ca3af;
    cursor: not-allowed;
}

.dark .user-info-pagination .page-link {
    background: #374151;
    border-color: #4b5563;
    color: #9ca3af;
}

.dark .user-info-pagination .page-link:hover {
    background: #4b5563;
    color: #e5e7eb;
}

.dark .user-info-pagination .page-item.active .page-link {
    background: #4f46e5;
    border-color: #4f46e5;
}

/* =============================================
   Login Required Message
   ============================================= */
.user-info-login-required {
    text-align: center;
    padding: 1.5rem;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 0.75rem;
    margin-top: 1rem;
}

.user-info-login-required i {
    font-size: 1.5rem;
    color: #0284c7;
    margin-bottom: 0.5rem;
}

.user-info-login-required p {
    margin: 0 0 0.75rem 0;
    color: #0369a1;
    font-size: 0.9rem;
}

.user-info-login-required a {
    color: #0284c7;
    font-weight: 500;
    text-decoration: underline;
}

.user-info-login-required a:hover {
    color: #0369a1;
}

.dark .user-info-login-required {
    background: #0c4a6e;
    border-color: #0369a1;
}

.dark .user-info-login-required i {
    color: #38bdf8;
}

.dark .user-info-login-required p {
    color: #7dd3fc;
}

.dark .user-info-login-required a {
    color: #38bdf8;
}

/* =============================================
   Mobile Responsive
   ============================================= */
@media (max-width: 576px) {
    .user-info-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .user-info-item {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .user-info-avatar {
        align-self: flex-start;
    }

    .user-info-modal {
        max-height: 100vh;
        max-height: 100dvh; /* dynamic viewport height for mobile */
        min-height: auto;
        border-radius: 0;
    }

    .user-info-modal-body {
        padding: 1rem;
    }

    .user-info-modal-body .text-editor-component {
        min-height: 180px;
    }

    .user-info-modal-body .text-editor-area {
        min-height: 150px;
        max-height: 250px;
    }

    .user-info-modal-footer {
        flex-direction: column;
        gap: 0.5rem;
    }

    .user-info-modal-footer button {
        width: 100%;
    }

    .user-info-toast {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
}
