@import url('global.css');

/*! OVERALL COMPONENTS ==================================================*/

.accountTitle {
    color: var(--primary-color);
    font-size: 2rem;
    text-align: center;
    margin-bottom: 20px;
}

.accountSubtitle {
    color: var(--primary-color);
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 20px;
}

.accountText {
    color: var(--text-color);
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 20px;
}

.accountInfoText {
    color: var(--secondary-text-color);
    font-size: 1rem;
    text-align: center;
    margin-bottom: 20px;
}

.accountContainer {
    width: 70%;
    min-height: 30rem;
    margin: 0 auto;
    margin-top: 1.5rem;
    padding: 10px 30px 10px 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}


/*! LOGIN/SIGNUP & LOGOUT ==================================================*/

.fluxer-button {
    padding: 12px 24px;
    background-color: var(--fluxer-color);
    color: var(--text-color);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.1s ease;
    text-decoration: none;
}

.fluxer-button:hover {
    filter: brightness(0.9);
}

#logout-button {
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: var(--text-color);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.1s ease;
    text-decoration: none;
}

#logout-button-confirm {
    padding: 12px 24px;
    background-color: var(--danger-color);
    color: var(--text-color);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.1s ease;
    text-decoration: none;
}

#logout-button:hover {
    filter: brightness(0.9);
}


/*! PROFILE ==================================================*/

.profileContainer {
    width: 80%;
    max-width: 1200px;
    margin: 0 auto;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}

.profile-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin-top: 20px;
}

.profile-left,
.profile-right {
    display: flex;
    flex-direction: column;
}

.reviews-card {
    /* Marker class to allow targeted ordering */
}

.profile-right {
    height: 100%;
}

.profile-card {
    background-color: var(--nav-bg-color);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.profile-left .profile-card:last-child {
    margin-bottom: 0;
    /* Ensures left column doesn't have extra bottom space causing mismatch */
}

.card-title {
    color: var(--primary-color);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    margin-top: 0;
    text-align: left;
}

.full-height {
    flex-grow: 1;
    margin-bottom: 0;
    box-sizing: border-box;
}

.profile-avatar-section {
    text-align: center;
    margin-bottom: 1.5rem;
}

.accountAvatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.profile-info-section {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.info-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}

.info-group:last-child {
    border-bottom: none;
}

.info-group .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--secondary-text-color);
    letter-spacing: 1.5px;
    font-weight: 600;
}

.info-group .value {
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 500;
}


.profile-logout-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: var(--text-color);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.1s ease;
    text-decoration: none;
    box-sizing: border-box;
}

.profile-logout-btn:hover {
    filter: brightness(0.9);
}

/* Listings Section */
.listings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.add-listing-btn {
    background-color: var(--primary-color);
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: filter 0.1s ease;
}

.add-listing-btn:hover {
    filter: brightness(0.9);
}

.listings-tabs {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--secondary-text-color);
    font-size: 1rem;
    font-weight: 600;
    padding: 10px 20px;
    cursor: pointer;
    transition: color 0.2s ease, border-bottom 0.2s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: var(--text-color);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.user-listings-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.user-listing-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--listing-bg-color);
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.user-listing-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.user-listing-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-listing-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.user-listing-img.status-public {
    border-color: var(--listing-status-public);
}

.user-listing-img.status-review {
    border-color: var(--listing-status-review);
}

.user-listing-img.status-private {
    border-color: var(--listing-status-private);
}

.user-listing-img.status-declined {
    border-color: var(--listing-status-declined);
}

/* Declined Info display (shared) */
.declined-info-box {
    margin-top: 15px;
    padding: 12px;
    background: rgba(255, 0, 56, 0.1);
    border-left: 4px solid var(--danger-color);
    border-radius: 4px;
    color: #ccc;
    font-size: 0.9em;
}

.declined-moderator-text {
    font-weight: bold;
    color: #fff;
}

.declined-reason-text {
    margin-top: 5px;
    display: block;
    color: #eee;
}

.user-listing-info {
    display: flex;
    flex-direction: column;
}

.user-listing-title {
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
}

.user-listing-bumped {
    color: var(--secondary-text-color);
    font-size: 0.85rem;
    margin-top: 2px;
}

.user-listing-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: filter 0.2s ease;
    font-size: 0.9em;
}

.action-btn:hover {
    filter: brightness(0.9);
}

.edit-btn,
.view-btn {
    background-color: transparent;
    border: 1px solid var(--text-color);
    color: var(--text-color);
}

.bump-btn {
    background-color: var(--fluxer-color);
    color: var(--text-color);
}

/*! MOBILE RESPONSIVE ==================================================*/
@media (max-width: 900px) {
    .profileContainer {
        width: 95%;
        margin-top: 1rem;
    }

    .profile-layout {
        display: flex;
        flex-direction: column;
    }

    /* Move inner blocks of the left sub-container to participate in the master flex flow */
    .profile-left {
        display: contents;
    }

    .profile-right {
        order: 2;
        /* Listings appear second */
    }

    .reviews-card {
        order: 3;
        /* Reviews appear last (underneath) */
    }

    .profile-card:first-child {
        order: 1;
        /* Profile info block stays topmost */
    }

    .user-listing-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .user-listing-actions {
        width: 100%;
        justify-content: stretch;
    }

    .action-btn {
        flex: 1;
        text-align: center;
    }
}