/* ============================================================
 * MyStudyBestie
 * ============================================================ */


/* ============================================================
 * Marketplace - Shared
 * ============================================================ */

.study-market,
.study-market-public {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    box-sizing: border-box;
}

.study-market h1,
.study-market-public h1 {
    margin-top: 0;
    color: #25233a;
}

.study-market h2,
.study-market-public h2 {
    color: #35324f;
}

.study-market a,
.study-market-public a {
    text-decoration: none;
}


/* ============================================================
 * Account Marketplace Navigation
 * ============================================================ */

.study-market-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 28px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e4e2ed;
}

.study-market-nav a {
    display: inline-block;
    padding: 9px 15px;
    border-radius: 8px;
    color: #5c5875;
    font-weight: 600;
    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}

.study-market-nav a:hover {
    background: #f1eff8;
    color: #332f55;
}

.study-market-nav a.active {
    background: #6657c7;
    color: #fff;
}


/* ============================================================
 * Buttons
 * ============================================================ */

.study-market-button,
.study-market-secondary-button {
    display: inline-block;
    padding: 10px 18px;
    border: 0;
    border-radius: 8px;
    background: #6657c7;
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition:
        background-color 0.15s ease,
        transform 0.15s ease;
}

.study-market-button:hover,
.study-market-secondary-button:hover {
    background: #5546b7;
}

.study-market-button:active,
.study-market-secondary-button:active {
    transform: translateY(1px);
}

.study-market-secondary-button {
    background: #fff;
    color: #5a4eb1 !important;
    border: 1px solid #cfc9ed;
}

.study-market-secondary-button:hover {
    background: #f5f3fc;
}


/* ============================================================
 * Public Marketplace Hero
 * ============================================================ */

.study-market-hero {
    padding: 34px;
    margin-bottom: 30px;
    border-radius: 16px;
    background:
        linear-gradient(
            135deg,
            #eeeafd,
            #f8f7fd
        );
    border: 1px solid #ded9f4;
}

.study-market-hero h1 {
    margin: 0 0 10px 0;
    font-size: 32px;
}

.study-market-hero p {
    max-width: 680px;
    margin: 0;
    color: #625e77;
    font-size: 17px;
    line-height: 1.6;
}

.study-market-hero-actions {
    margin-top: 20px;
}


/* ============================================================
 * Public Marketplace Grid
 * ============================================================ */

.study-market-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}


/* ============================================================
 * Marketplace Card
 * ============================================================ */

.study-market-card {
    display: flex;
    flex-direction: column;
    min-height: 250px;
    background: #fff;
    border: 1px solid #e2e0ea;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(35, 30, 70, 0.05);
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.study-market-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 18px rgba(35, 30, 70, 0.10);
}

.study-market-card-body {
    flex: 1;
    padding: 20px;
}

.study-market-card-title {
    display: block;
    margin-bottom: 12px;
    color: #37305f;
    font-size: 20px;
    font-weight: 700;
}

.study-market-card-title:hover {
    color: #6657c7;
}

.study-market-card-description {
    margin-top: 14px;
    color: #656174;
    line-height: 1.5;
}

.study-market-card-meta,
.study-market-set-meta,
.study-market-review-meta {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.study-market-card-meta span,
.study-market-set-meta span,
.study-market-review-meta span {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 20px;
    background: #f0eef7;
    color: #5e5975;
    font-size: 12px;
    font-weight: 600;
}

.study-market-card-footer {
    padding: 14px 20px;
    background: #faf9fc;
    border-top: 1px solid #ebe9f0;
}


/* ============================================================
 * Creator
 * ============================================================ */

.study-market-author {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 10px 0;
    color: #6a6679;
    font-size: 13px;
}

.study-market-author img {
    width: 30px;
    height: 30px;
    object-fit: cover;
    border-radius: 50%;
}


/* ============================================================
 * Empty States
 * ============================================================ */

.study-market-empty {
    padding: 45px 30px;
    text-align: center;
    background: #faf9fc;
    border: 1px dashed #d5d1e3;
    border-radius: 14px;
}

.study-market-empty h1,
.study-market-empty h2 {
    margin-top: 0;
}

.study-market-empty p {
    color: #716d7d;
}


/* ============================================================
 * Account Home
 * ============================================================ */

.study-market-home {
    padding: 10px 0 30px 0;
}

.study-market-home > p {
    max-width: 700px;
    color: #696578;
    font-size: 16px;
    line-height: 1.6;
}

.study-market-home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}


/* ============================================================
 * Admin Review List
 * ============================================================ */

.study-market-admin > p {
    color: #696578;
    margin-bottom: 25px;
}

.study-market-review-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.study-market-review-card {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e1dfe9;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(35, 30, 70, 0.04);
}

.study-market-review-card-body {
    flex: 1;
    min-width: 0;
}

.study-market-review-title {
    color: #37305f;
    font-size: 19px;
    font-weight: 700;
}

.study-market-review-title:hover {
    color: #6657c7;
}

.study-market-review-author {
    margin-top: 10px;
    color: #777283;
    font-size: 13px;
}

.study-market-review-description {
    margin-top: 12px;
    color: #625e70;
    line-height: 1.5;
}

.study-market-review-card-actions {
    display: flex;
    align-items: center;
}


/* ============================================================
 * Admin Review Page
 * ============================================================ */

.study-market-review-page,
.study-market-set-page {
    max-width: 900px;
}

.study-market-back {
    margin-bottom: 20px;
}

.study-market-back a {
    color: #6657c7;
    font-weight: 600;
}

.study-market-back a:hover {
    text-decoration: underline;
}

.study-market-review-page > h1,
.study-market-set-heading h1 {
    margin-bottom: 8px;
}

.study-market-set-description,
.study-market-review-description {
    margin-top: 16px;
    color: #625e70;
    font-size: 15px;
    line-height: 1.6;
}


/* ============================================================
 * Flashcard Preview
 * ============================================================ */

.study-market-review-cards,
.study-market-set-preview {
    margin-top: 30px;
}

.study-market-review-cards h2,
.study-market-set-preview h2 {
    margin-bottom: 16px;
}

.study-market-review-flashcard,
.study-market-preview-card {
    margin-bottom: 16px;
    padding: 20px;
    background: #fff;
    border: 1px solid #dfdce8;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(35, 30, 70, 0.04);
}

.study-market-review-card-number,
.study-market-preview-number {
    margin-bottom: 14px;
    color: #7a748f;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.study-market-review-question,
.study-market-preview-question {
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid #eceaf1;
}

.study-market-review-question strong,
.study-market-review-answer strong,
.study-market-preview-question strong,
.study-market-preview-answer strong {
    display: block;
    margin-bottom: 7px;
    color: #4d4768;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.study-market-review-question > div,
.study-market-review-answer > div,
.study-market-preview-question > div,
.study-market-preview-answer > div {
    color: #302d3d;
    font-size: 16px;
    line-height: 1.5;
}


/* ============================================================
 * Moderation Actions
 * ============================================================ */

.study-market-review-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid #e4e1eb;
}

.study-market-approve-button,
.study-market-reject-button {
    padding: 11px 20px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.study-market-approve-button {
    background: #2f8a55;
}

.study-market-approve-button:hover {
    background: #287849;
}

.study-market-reject-button {
    background: #bd4d54;
}

.study-market-reject-button:hover {
    background: #a84148;
}


/* ============================================================
 * Responsive
 * ============================================================ */

@media (max-width: 700px) {

    .study-market,
    .study-market-public {
        padding: 15px;
    }

    .study-market-hero {
        padding: 24px 20px;
    }

    .study-market-hero h1 {
        font-size: 27px;
    }

    .study-market-grid {
        grid-template-columns: 1fr;
    }

    .study-market-review-card {
        flex-direction: column;
    }

    .study-market-review-card-actions {
        align-items: stretch;
    }

    .study-market-review-card-actions
    .study-market-button {
        text-align: center;
    }

    .study-market-review-actions {
        flex-direction: column;
    }

    .study-market-approve-button,
    .study-market-reject-button {
        width: 100%;
    }
}
