/**
 * Club Section Styles - MotoForma.cz
 * Modular styles for the club member area
 */

/* ==========================================
   LAYOUT
   ========================================== */

.club-layout {
    display: flex;
    min-height: 60vh;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.club-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: white;
    border-right: 1px solid var(--mf-border);
    padding: 1.25rem 0;
}

.club-sidebar__nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.club-sidebar__item {
    margin: 0 0.75rem 0.25rem;
}

.club-sidebar__link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--mf-gray-600);
    text-decoration: none;
    font-weight: var(--font-medium);
    font-size: 1rem;
    transition: all var(--transition-fast);
    border-radius: var(--radius-md);
}

.club-sidebar__link:hover {
    background: var(--mf-surface-hover);
    color: var(--mf-red);
}

.club-sidebar__link.is-active {
    background: var(--mf-red);
    background: linear-gradient(135deg, var(--mf-red) 0%, var(--mf-red-dark) 100%);
    color: var(--mf-white);
    box-shadow: var(--shadow-red);
}

.club-sidebar__link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    transition: transform var(--transition-fast);
}

.club-sidebar__link:hover i {
    transform: scale(1.1);
}

.club-sidebar__link.is-active i {
    transform: none;
}

.club-sidebar__divider {
    height: 1px;
    background: var(--mf-border);
    margin: 0.75rem 1.25rem;
}

.club-sidebar__logout {
    margin-top: 0.5rem;
}

.club-sidebar__link--danger {
    color: var(--mf-gray-500);
}

.club-sidebar__link--danger:hover {
    background: var(--mf-danger-light);
    color: var(--mf-danger);
}

.club-content {
    flex: 1;
    padding: 2rem;
    min-width: 0;
    background: var(--mf-surface-subtle);
}

/* Mobile sidebar */
@media (max-width: 991px) {
    .club-layout {
        flex-direction: column;
        border-radius: 0;
        box-shadow: none;
    }

    .club-sidebar {
        width: 100%;
        padding: 0.75rem 0;
        border-right: none;
        border-bottom: 1px solid var(--mf-border);
        background: white;
    }

    .club-sidebar__nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        padding: 0 0.75rem;
    }

    .club-sidebar__item {
        margin: 0;
    }

    .club-sidebar__link {
        padding: 0.5rem 0.875rem;
        border-radius: var(--radius-pill);
        font-size: 1rem;
        background: var(--mf-surface-hover);
    }

    .club-sidebar__link:hover {
        background: var(--mf-border);
    }

    .club-sidebar__link.is-active {
        background: var(--mf-red);
        background: linear-gradient(135deg, var(--mf-red) 0%, var(--mf-red-dark) 100%);
        color: var(--mf-white);
        box-shadow: var(--shadow-red);
    }

    .club-sidebar__link--danger {
        background: transparent;
    }

    .club-sidebar__link--danger:hover {
        background: var(--mf-danger-light);
    }

    .club-sidebar__divider {
        display: none;
    }

    .club-content {
        padding: 1.5rem;
    }
}

/* ==========================================
   LOGOUT MODAL
   ========================================== */

.club-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.club-modal__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.club-modal__dialog {
    position: relative;
    background: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    max-width: 380px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-xl);
}

.club-modal__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem;
    background: linear-gradient(135deg, var(--mf-danger-light) 0%, var(--mf-danger-bg) 100%);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--mf-red);
}

.club-modal__title {
    font-size: 1.5rem;
    font-weight: var(--font-bold);
    margin: 0 0 0.5rem;
    color: var(--mf-dark);
}

.club-modal__text {
    color: var(--mf-gray-500);
    margin: 0 0 1.5rem;
    line-height: 1.5;
}

.club-modal__actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.club-modal__btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: var(--font-semibold);
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

.club-modal__btn--cancel {
    background: var(--mf-lighter);
    color: var(--mf-gray-700);
}

.club-modal__btn--cancel:hover {
    background: var(--mf-lighter);
}

.club-modal__btn--confirm {
    background: linear-gradient(135deg, var(--mf-red) 0%, var(--mf-red-dark) 100%);
    color: var(--mf-white);
}

.club-modal__btn--confirm:hover {
    background: linear-gradient(135deg, var(--mf-red-dark) 0%, var(--mf-red-darker) 100%);
    box-shadow: var(--shadow-red);
}

/* Modal transitions */
.club-modal--enter {
    transition: all var(--transition-normal);
}

.club-modal--enter-start {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
}

.club-modal--enter-end {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.club-modal--leave {
    transition: all var(--transition-fast);
}

.club-modal--leave-start {
    opacity: 1;
    transform: scale(1);
}

.club-modal--leave-end {
    opacity: 0;
    transform: scale(0.9);
}

/* ==========================================
   COMMON COMPONENTS
   ========================================== */

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: var(--font-medium);
}

.badge--yellow { background: var(--mf-warning-light); color: var(--mf-warning-dark); }
.badge--blue { background: var(--mf-info-light); color: var(--mf-info-dark); }
.badge--green { background: var(--mf-success-light); color: var(--mf-success-dark); }
.badge--red { background: var(--mf-danger-light-bg); color: var(--mf-danger-dark-text); }

/* ==========================================
   ADMIN TABLE
   ========================================== */

.admin-table {
    border-collapse: collapse;
    width: 100%;
}

.admin-table th,
.admin-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--mf-border-dark);
}

.admin-table th {
    background: var(--mf-surface-hover);
    font-weight: var(--font-semibold);
}

.admin-table tr:hover {
    background: var(--mf-surface-subtle);
}

/* ==========================================
   FEATURE CARDS
   ========================================== */

.feature-card__badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-pill);
    font-size: 1rem;
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.feature-card__badge--primary {
    background: var(--mf-red);
    color: white;
}

.feature-card__badge--secondary {
    background: var(--mf-secondary);
    color: white;
}

/* ==========================================
   FORM ENHANCEMENTS
   ========================================== */

.contact-form__submit--secondary {
    background: var(--mf-secondary);
}

.contact-form__submit--secondary:hover {
    background: var(--mf-secondary-dark);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* ==========================================
   MARKETPLACE
   ========================================== */

.marketplace-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--mf-border);
}

.marketplace-tab {
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--mf-border-dark);
    background: white;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1rem;
    font-weight: var(--font-medium);
    transition: all var(--transition-fast);
}

.marketplace-tab:hover {
    border-color: var(--mf-red);
    color: var(--mf-red);
}

.marketplace-tab.active {
    background: var(--mf-red);
    border-color: var(--mf-red);
    color: var(--mf-white);
}

.marketplace-tab--cta {
    background: var(--mf-red);
    border-color: var(--mf-red);
    color: white;
}

.marketplace-tab--cta:hover {
    background: var(--mf-red-dark);
    border-color: var(--mf-red-dark);
    color: white;
}

/* Marketplace Filters */
.marketplace-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.marketplace-filter {
    flex: 1;
    min-width: 150px;
}

.marketplace-filter .contact-form__input {
    margin-bottom: 0;
}

.marketplace-stats {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--mf-light);
    border-radius: var(--radius-md);
}

/* Marketplace Grid */
.marketplace-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Marketplace Card */
.marketplace-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.marketplace-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.marketplace-card--own {
    cursor: default;
}

.marketplace-card--own:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
}

.marketplace-card__image {
    position: relative;
    height: 180px;
    background: var(--mf-surface-hover);
    overflow: hidden;
}

.marketplace-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.marketplace-card__no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--mf-gray-200);
    font-size: 3rem;
}

.marketplace-card__type,
.marketplace-card__status {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-pill);
    font-size: 1rem;
    font-weight: var(--font-semibold);
    text-transform: uppercase;
}

.marketplace-card__type--sell {
    background: var(--mf-red);
    color: white;
}

.marketplace-card__type--buy {
    background: var(--mf-blue);
    color: white;
}

.marketplace-card__type--gift {
    background: var(--mf-green);
    color: white;
}

.marketplace-card__status--active {
    background: var(--mf-green);
    color: white;
}

.marketplace-card__status--reserved {
    background: var(--mf-orange);
    color: white;
}

.marketplace-card__status--sold {
    background: var(--mf-purple);
    color: white;
}

.marketplace-card__status--expired {
    background: var(--mf-gray-300);
    color: white;
}

.marketplace-card__content {
    padding: 1rem;
}

.marketplace-card__title {
    font-size: 1rem;
    font-weight: var(--font-semibold);
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.marketplace-card__category {
    font-size: 1rem;
    color: var(--mf-gray-500);
    margin: 0 0 0.5rem 0;
}

.marketplace-card__price {
    font-size: 1.1rem;
    font-weight: var(--font-bold);
    color: var(--mf-red);
    margin: 0 0 0.5rem 0;
}

.marketplace-card__meta {
    font-size: 1rem;
    color: var(--mf-gray-500);
    margin: 0;
}

.marketplace-card__meta span {
    margin-right: 0.5rem;
}

.marketplace-card__expired {
    color: var(--mf-danger);
    font-size: 1rem;
    margin: 0.5rem 0;
}

.marketplace-card__expiring {
    color: var(--mf-orange);
    font-size: 1rem;
    margin: 0.5rem 0;
}

.marketplace-card__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--mf-border);
}

/* Marketplace Pagination */
.marketplace-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* ==========================================
   MARKETPLACE DETAIL
   ========================================== */

.marketplace-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .marketplace-detail {
        grid-template-columns: 1fr;
    }
}

.marketplace-detail__gallery {
    position: relative;
}

.marketplace-detail__main-image {
    width: 100%;
    aspect-ratio: 4/3;
    background: var(--mf-surface-hover);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.marketplace-detail__main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.marketplace-detail__thumbnails {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    overflow-x: auto;
}

.marketplace-detail__thumbnails img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-md);
    cursor: pointer;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}

.marketplace-detail__thumbnails img:hover,
.marketplace-detail__thumbnails img.selected {
    opacity: 1;
}

.marketplace-detail__no-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    background: var(--mf-surface-hover);
    border-radius: var(--radius-lg);
    color: var(--mf-gray-200);
}

.marketplace-detail__type {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-pill);
    font-size: 1rem;
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.marketplace-detail__type--sell { background: var(--mf-red); color: white; }
.marketplace-detail__type--buy { background: var(--mf-blue); color: white; }
.marketplace-detail__type--gift { background: var(--mf-green); color: white; }

.marketplace-detail__title {
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
}

.marketplace-detail__price {
    font-size: 1.75rem;
    font-weight: var(--font-bold);
    color: var(--mf-red);
    margin: 0 0 1rem 0;
}

.marketplace-detail__meta {
    margin-bottom: 1.5rem;
}

.marketplace-detail__meta p {
    margin: 0.25rem 0;
}

.marketplace-detail__description {
    margin-bottom: 1.5rem;
}

.marketplace-detail__description h3 {
    font-size: 1rem;
    margin: 0 0 0.5rem 0;
    color: var(--mf-gray-500);
}

.marketplace-detail__description p {
    white-space: pre-line;
}

.marketplace-detail__contact {
    background: var(--mf-light);
    padding: 1rem;
    border-radius: var(--radius-md);
}

.marketplace-detail__contact h3 {
    font-size: 1rem;
    margin: 0 0 0.75rem 0;
}

.marketplace-detail__contact p {
    margin: 0.25rem 0;
}

.marketplace-detail__contact a {
    color: var(--mf-red);
}

/* ==========================================
   MARKETPLACE IMAGES
   ========================================== */

.marketplace-images__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.marketplace-images__item {
    position: relative;
    aspect-ratio: 1;
    background: var(--mf-surface-hover);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.marketplace-images__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.marketplace-images__delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.marketplace-images__upload input[type="file"] {
    display: none;
}

.marketplace-images__upload label {
    cursor: pointer;
}

/* ==========================================
   BUTTON VARIANTS
   ========================================== */

.btn--sm {
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
}

.btn--danger {
    background: var(--mf-danger);
    border-color: var(--mf-danger);
    color: white;
}

.btn--danger:hover {
    background: var(--mf-danger-dark);
    border-color: var(--mf-danger-dark);
}

/* ==========================================
   CLUB HEADER (for logged-in state)
   ========================================== */

.club-header {
    margin-bottom: 2rem;
}

.club-header__title {
    font-size: 1.75rem;
    margin: 0 0 0.5rem 0;
}

.club-header__subtitle {
    color: var(--mf-gray-500);
    margin: 0;
}

/* ==========================================
   PROFILE SECTION
   ========================================== */

.club-profile {
    max-width: 600px;
}

.club-profile__section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--mf-lighter);
}

.club-profile__section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.club-profile__section-title {
    font-size: 1.25rem;
    margin: 0 0 1rem 0;
}

/* ==========================================
   ORDERS SECTION
   ========================================== */

.club-orders__empty {
    text-align: center;
    padding: 3rem 1rem;
}

.club-orders__empty p {
    margin-bottom: 1rem;
    color: var(--mf-gray-500);
}

/* ==========================================
   UPCOMING EVENTS
   ========================================== */

.club-upcoming__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.club-upcoming__empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--mf-gray-500);
}

/* ==========================================
   MOTORCYCLES LIST (Profile)
   ========================================== */

.motorcycles-list {
    margin-bottom: 0.75rem;
}

.motorcycles-list__loading,
.motorcycles-list__empty {
    padding: 1rem;
    text-align: center;
    color: var(--mf-gray-500);
    font-size: 1rem;
    background: var(--mf-light);
    border-radius: var(--radius-sm);
    border: 1px dashed var(--mf-border-dark);
}

.motorcycles-list__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: white;
    border: 1px solid var(--mf-lighter);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    transition: all var(--transition-fast);
}

.motorcycles-list__item:hover {
    border-color: var(--mf-red);
    box-shadow: 0 2px 6px rgba(206, 0, 0, 0.1);
}

.motorcycles-list__icon {
    color: var(--mf-red);
    font-size: 1rem;
}

.motorcycles-list__name {
    flex: 1;
    font-weight: var(--font-medium);
    color: var(--mf-gray-800);
}

.motorcycles-list__delete {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--mf-gray-300);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.motorcycles-list__delete:hover {
    background: var(--mf-danger-light);
    color: var(--mf-danger);
}

.motorcycles-list__delete:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.motorcycles-add {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.motorcycles-add__input {
    flex: 1;
}

.motorcycles-add__button {
    padding: 0.6rem 1rem;
    background: linear-gradient(135deg, var(--mf-red) 0%, var(--mf-red-dark) 100%);
    color: var(--mf-white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.motorcycles-add__button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-red);
}

.motorcycles-add__button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.contact-form__hint {
    display: block;
    color: var(--mf-gray-500);
    font-size: 1rem;
}
