/**
 * Card/Panel Design for User Admin
 * File: src/scss/components/user-admin-card-panel.scss
 */

.fe-admin-design-card-panel {
    &.fe_fs_user_admin_wrap {
        font-family:
            "Inter",
            -apple-system,
            BlinkMacSystemFont,
            "Segoe UI",
            Roboto,
            sans-serif;
        background: #f8fafc;
        min-height: 100vh;
        padding: 1.5rem;

        // Header with tabs and logout
        .fe_fs_header_buttons {
            background: white;
            border-radius: 16px;
            padding: 1.5rem 2rem;
            margin-bottom: 2rem;
            box-shadow:
                0 1px 3px rgba(0, 0, 0, 0.1),
                0 1px 2px rgba(0, 0, 0, 0.06);
            border: 1px solid #e5e7eb;
            display: flex;
            justify-content: space-between;
            align-items: center;

            .fe_fs_tabs {
                display: flex;
                list-style: none;
                margin: 0;
                padding: 0.5rem;
                background: #f9fafb;
                border-radius: 12px;
                gap: 0.25rem;

                li {
                    a {
                        text-decoration: none;

                        button {
                            background: none;
                            border: none;
                            padding: 0.75rem 1.5rem;
                            color: #6b7280;
                            font-weight: 500;
                            cursor: pointer;
                            transition: all 0.2s ease;
                            border-radius: 8px;
                            font-size: 0.95rem;

                            &:hover {
                                color: #374151;
                                background: #f3f4f6;
                            }
                        }
                    }

                    &.active-tab {
                        a button {
                            color: #3b82f6;
                            background: #eff6ff;
                            font-weight: 600;
                        }
                    }
                }
            }

            .fus-logout {
                a {
                    text-decoration: none;

                    button {
                        background: linear-gradient(135deg, #3b82f6, #1d4ed8);
                        color: white;
                        border: none;
                        border-radius: 8px;
                        padding: 0.75rem 1.5rem;
                        font-size: 0.95rem;
                        font-weight: 600;
                        cursor: pointer;
                        transition: all 0.2s ease;
                        display: inline-flex;
                        align-items: center;
                        gap: 0.5rem;

                        &:hover {
                            background: linear-gradient(135deg, #2563eb, #1e40af);
                            transform: translateY(-1px);
                            box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
                        }
                    }
                }
            }
        }

        // Main content area
        .fe_fs_post_list {
            background: white;
            border-radius: 16px;
            box-shadow:
                0 1px 3px rgba(0, 0, 0, 0.1),
                0 1px 2px rgba(0, 0, 0, 0.06);
            border: 1px solid #e5e7eb;
            overflow: hidden;
            transition: all 0.2s ease;

            &:hover {
                box-shadow:
                    0 4px 6px rgba(0, 0, 0, 0.1),
                    0 2px 4px rgba(0, 0, 0, 0.06);
                transform: translateY(-1px);
            }

            .fe_fs_title {
                background: #f9fafb;
                padding: 2rem;
                border-bottom: 2px solid #f3f4f6;
                display: flex;
                align-items: center;
                justify-content: space-between;

                strong {
                    color: #111827;
                    font-size: 1.5rem;
                    font-weight: 700;
                    display: flex;
                    align-items: center;
                    gap: 0.75rem;

                    &::before {
                        content: "";
                        width: 4px;
                        height: 24px;
                        background: linear-gradient(135deg, #3b82f6, #1d4ed8);
                        border-radius: 2px;
                    }
                }

                a {
                    color: #3b82f6;
                    text-decoration: none;
                    font-size: 0.95rem;
                    font-weight: 500;
                    padding: 0.5rem 1rem;
                    border-radius: 6px;
                    transition: all 0.2s ease;

                    &:hover {
                        background: #eff6ff;
                        color: #1d4ed8;
                    }
                }
            }

            // Posts container styling
            .fe_fs_posts_container {
                .fe_fs_post_item {
                    display: flex;
                    align-items: center;
                    padding: 1.5rem 2rem;
                    border-bottom: 1px solid #f3f4f6;
                    transition: all 0.2s ease;

                    &:hover {
                        background: #f9fafb;
                    }

                    &:last-child {
                        border-bottom: none;
                    }

                    .fe_fs_post_thumbnail {
                        flex-shrink: 0;
                        width: 80px;
                        margin-right: 2rem;

                        a {
                            display: block;

                            .img__box {
                                width: 60px;
                                height: 60px;
                                background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
                                border-radius: 12px;
                                display: flex;
                                align-items: center;
                                justify-content: center;
                                transition: all 0.2s ease;
                                border: 2px solid #e5e7eb;
                                overflow: hidden;
                                position: relative;

                                &::before {
                                    content: "📄";
                                    font-size: 1.5rem;
                                    opacity: 0.6;
                                }

                                img {
                                    width: 100%;
                                    height: 100%;
                                    object-fit: cover;
                                    border-radius: 10px;
                                    position: absolute;
                                }

                                &:hover {
                                    transform: scale(1.05);
                                    border-color: #3b82f6;
                                    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
                                }
                            }
                        }
                    }

                    .fe_fs_post_content {
                        flex: 1;
                        min-width: 0;

                        .fe_fs_post_title {
                            a {
                                color: #111827;
                                text-decoration: none;
                                font-weight: 600;
                                font-size: 1.1rem;
                                transition: all 0.2s ease;
                                display: block;
                                line-height: 1.4;

                                &:hover {
                                    color: #3b82f6;
                                }
                            }
                        }

                        .fe_fs_post_meta {
                            margin-top: 0.5rem;
                            display: flex;
                            gap: 1rem;
                            font-size: 0.85rem;
                            color: #6b7280;

                            .fe_fs_post_date,
                            .fe_fs_post_status {
                                background: #f3f4f6;
                                padding: 0.25rem 0.75rem;
                                border-radius: 12px;
                                font-weight: 500;
                                border: 1px solid #e5e7eb;
                            }
                        }
                    }

                    .fe_fs_post_actions {
                        display: flex;
                        gap: 0.75rem;
                        margin-left: 1rem;

                        .fe_fs_edit__btn,
                        .fe_fs_delete__btn {
                            .link-icon {
                                display: inline-flex;
                                align-items: center;
                                justify-content: center;
                                width: 40px;
                                height: 40px;
                                border-radius: 8px;
                                transition: all 0.2s ease;
                                text-decoration: none;
                                border: 2px solid transparent;
                                cursor: pointer;

                                .fe_fs_icon {
                                    width: 18px;
                                    height: 18px;
                                    transition: all 0.2s ease;
                                }

                                &.disabled {
                                    opacity: 0.6;
                                    cursor: not-allowed;
                                    pointer-events: none;
                                    background: #f3f4f6 !important;
                                    border-color: #e5e7eb !important;

                                    .fe_fs_icon {
                                        width: 16px !important;
                                        height: 16px !important;
                                        opacity: 0.7;
                                    }
                                }
                            }
                        }

                        .fe_fs_edit__btn .link-icon {
                            background: #ecfdf5;
                            border-color: #d1fae5;

                            &:hover:not(.disabled) {
                                background: #d1fae5;
                                border-color: #10b981;
                                transform: translateY(-1px);
                                box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
                            }
                        }

                        .fe_fs_delete__btn .link-icon {
                            background: #fef2f2;
                            border-color: #fecaca;

                            &:hover:not(.disabled) {
                                background: #fecaca;
                                border-color: #ef4444;
                                transform: translateY(-1px);
                                box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
                            }
                        }
                    }
                }
            }

            // Pagination styling
            .pagination {
                display: flex;
                justify-content: space-around;
                padding: 1.5rem 2rem;

                .page-numbers {
                    display: inline-flex;
                    align-items: center;
                    justify-content: center;
                    padding: 0.5rem 0.75rem;
                    margin: 0 0.125rem;
                    color: #374151;
                    text-decoration: none;
                    border-radius: 6px;
                    transition: all 0.2s ease;
                    font-weight: 500;
                    font-size: 0.9rem;
                    border: 1px solid #d1d5db;
                    background: white;
                    min-width: 40px;
                    width: 90%;

                    &:hover {
                        background: #f9fafb;
                        border-color: #9ca3af;
                    }

                    &.current {
                        background: #3b82f6;
                        color: white;
                        border-color: #3b82f6;
                    }
                }
            }

            // No posts message
            .fe_fs_no_posts {
                text-align: center;
                padding: 3rem 2rem;

                p {
                    color: #6b7280;
                    font-size: 1.1rem;
                    margin: 0;
                }
            }
        }

        // Responsive Design
        @media (max-width: 768px) {
            padding: 1rem;

            .fe_fs_header_buttons {
                padding: 1rem;
                flex-direction: column;
                gap: 1rem;
                border-radius: 12px;

                .fe_fs_tabs {
                    padding: 0.25rem;

                    li a button {
                        padding: 0.5rem 1rem;
                        font-size: 0.9rem;
                    }
                }
            }

            .fe_fs_post_list {
                border-radius: 12px;

                .fe_fs_title {
                    padding: 1.5rem 1rem;
                    flex-direction: column;
                    align-items: flex-start;
                    gap: 1rem;

                    strong {
                        font-size: 1.25rem;
                    }
                }

                .fe_fs_posts_container {
                    .fe_fs_post_item {
                        padding: 1rem;
                        flex-wrap: wrap;
                        gap: 1rem;

                        .fe_fs_post_thumbnail {
                            width: 60px;
                            margin-right: 0;

                            .img__box {
                                width: 50px;
                                height: 50px;
                            }
                        }

                        .fe_fs_post_content {
                            flex: 1;
                            min-width: 200px;

                            .fe_fs_post_title a {
                                font-size: 1rem;
                            }

                            .fe_fs_post_meta {
                                flex-direction: column;
                                gap: 0.5rem;
                            }
                        }

                        .fe_fs_post_actions {
                            margin-left: 0;

                            .fe_fs_edit__btn,
                            .fe_fs_delete__btn {
                                .link-icon {
                                    width: 35px;
                                    height: 35px;

                                    .fe_fs_icon {
                                        width: 16px;
                                        height: 16px;
                                    }
                                }
                            }
                        }
                    }
                }

                .pagination {
                    padding: 1rem;
                    flex-direction: column;
                    gap: 0.75rem;
                    align-items: center;
                }
            }
        }

        @media (max-width: 480px) {
            padding: 0.5rem;

            .fe_fs_header_buttons {
                padding: 1rem 0.5rem;

                .fe_fs_tabs {
                    li a button {
                        padding: 0.5rem 0.75rem;
                        font-size: 0.85rem;
                    }
                }
            }

            .fe_fs_post_list {
                .fe_fs_title {
                    padding: 1rem 0.5rem;
                }

                .fe_fs_posts_container {
                    .fe_fs_post_item {
                        padding: 0.75rem 0.5rem;
                        flex-direction: column;
                        align-items: flex-start;

                        .fe_fs_post_content {
                            min-width: auto;
                            width: 100%;

                            .fe_fs_post_title a {
                                font-size: 0.9rem;
                            }
                        }

                        .fe_fs_post_actions {
                            align-self: flex-end;
                        }
                    }
                }

                .pagination {
                    padding: 0.75rem 0.5rem;
                }
            }
        }
    }
}
