/* Component-specific Styles */

/* Profile Sections */
.profile-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.profile-header {
    text-align: center;
    padding-bottom: 2rem;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 2rem;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    margin: 0 auto 1rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--secondary-color);
}

/* Trade Cards */
.trade-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.trade-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.trade-card.accepted {
    border-left-color: var(--success-color);
}

.trade-card.rejected {
    border-left-color: var(--danger-color);
}

.trade-card.pending {
    border-left-color: var(--warning-color);
}

.trade-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 1rem;
}

.trade-title {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0;
}

.trade-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.trade-status.pending {
    background: #fef3c7;
    color: #92400e;
}

.trade-status.accepted {
    background: #d1fae5;
    color: #065f46;
}

.trade-status.rejected {
    background: #fee2e2;
    color: #991b1b;
}

.trade-status.completed {
    background: #dbeafe;
    color: #1e40af;
}

.trade-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.trade-item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
}

.trade-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trade-item-details h6 {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.trade-item-price {
    color: var(--accent-color);
    font-weight: 600;
}

.trade-message {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 3px solid var(--primary-color);
}

.trade-message p {
    margin-bottom: 0;
    color: var(--secondary-color);
}

.trade-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* Item Detail Page */
.item-detail-image {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: #f8fafc;
    margin-bottom: 1rem;
}

.item-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: var(--transition);
}

.item-detail-image:hover img {
    transform: scale(1.02);
}

.item-detail-info {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.item-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.item-price-large {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.meta-item i {
    color: var(--primary-color);
}

.item-description {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    line-height: 1.7;
}

.item-seller {
    border-top: 2px solid #e2e8f0;
    padding-top: 1.5rem;
}

.seller-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.seller-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
}

.seller-details h6 {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.seller-join-date {
    color: var(--secondary-color);
    font-size: 0.8rem;
}

/* Modal Enhancements */
.modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 2px solid #e2e8f0;
    padding: 1.5rem 2rem;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    border-top: 2px solid #e2e8f0;
    padding: 1.5rem 2rem;
}

.modal-title {
    font-weight: 700;
    color: var(--dark-color);
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--secondary-color);
    transition: var(--transition);
}

.btn-close:hover {
    color: var(--danger-color);
}

/* Image Gallery */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
}

.gallery-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.gallery-thumbnail:hover {
    border-color: var(--primary-color);
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-sm {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

.spinner-lg {
    width: 40px;
    height: 40px;
    border-width: 4px;
}

/* Status Indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-indicator::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-indicator.active::before {
    background: var(--success-color);
}

.status-indicator.inactive::before {
    background: var(--secondary-color);
}

.status-indicator.pending::before {
    background: var(--warning-color);
}

/* Form Enhancements */
.form-floating {
    position: relative;
}

.form-floating .form-control {
    height: calc(3.5rem + 2px);
    line-height: 1.25;
}

.form-floating .form-control:focus {
    padding-top: 1.625rem;
    padding-bottom: 0.625rem;
}

.form-floating > label {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    padding: 1rem 0.75rem;
    pointer-events: none;
    border: 1px solid transparent;
    transform-origin: 0 0;
    transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    opacity: 0.65;
    transform: Scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

/* Responsive Utilities */
.d-mobile-none {
    display: block;
}

.d-mobile-block {
    display: none;
}

@media (max-width: 576px) {
    .d-mobile-none {
        display: none !important;
    }
    
    .d-mobile-block {
        display: block !important;
    }
    
    .profile-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .item-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .seller-info {
        flex-direction: column;
        text-align: center;
    }
}

/* Dark theme overrides */
@media (prefers-color-scheme: dark) {
    .profile-section,
    .item-detail-info,
    .trade-card {
        background: #1e293b;
        border-color: #334155;
    }
    
    .modal-content {
        background: #1e293b;
        color: #f8fafc;
    }
    
    .trade-message {
        background: #334155;
    }
}


