/**
 * PSM Marketplace - Front Office CSS
 *
 * @author    Christos A. Daggas
 * @copyright 2026 Christos A. Daggas
 * @license   Commercial
 */

/* Hide account-link icons when rendered inside the footer */
.footer a[id^="psm_marketplace-"] i.material-icons,
#footer a[id^="psm_marketplace-"] i.material-icons,
[id*="footer"] a[id^="psm_marketplace-"] i.material-icons {
    display: none;
}

/* Form Sections */
.psm-marketplace-submit-offer,
.psm-marketplace-shop-profile,
.psm-marketplace-my-offers {
    max-width: 900px;
}

.psm-marketplace-submit-offer .form-section,
.psm-marketplace-shop-profile .form-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}

.psm-marketplace-submit-offer .section-title,
.psm-marketplace-shop-profile .section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #2fb5d2;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #232323;
}

.psm-marketplace-submit-offer .section-title i,
.psm-marketplace-shop-profile .section-title i {
    color: #2fb5d2;
    font-size: 1.25rem;
}

/* Form Groups */
.psm-marketplace-submit-offer .form-group,
.psm-marketplace-shop-profile .form-group {
    margin-bottom: 1.25rem;
}

.psm-marketplace-submit-offer .form-control-label,
.psm-marketplace-shop-profile .form-control-label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: #232323;
}

.psm-marketplace-submit-offer .form-control,
.psm-marketplace-shop-profile .form-control {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.psm-marketplace-submit-offer .form-control:focus,
.psm-marketplace-shop-profile .form-control:focus {
    border-color: #2fb5d2;
    box-shadow: 0 0 0 0.2rem rgba(47, 181, 210, 0.15);
}

.psm-marketplace-submit-offer select.form-control,
.psm-marketplace-shop-profile select.form-control {
    height: auto;
    padding: 0.5rem 0.75rem;
}

.psm-marketplace-submit-offer textarea.form-control,
.psm-marketplace-shop-profile textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* Lang Tabs - Cleaner design */
.lang-tabs {
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
}

.lang-tabs .nav-tabs {
    margin-bottom: 0;
    border-bottom: 1px solid #e5e5e5;
    background: #f8f9fa;
    padding: 0;
}

.lang-tabs .nav-item {
    margin-bottom: 0;
}

.lang-tabs .nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
    border: none;
    border-radius: 0;
    background: transparent;
}

.lang-tabs .nav-link.active {
    color: #2fb5d2;
    background: #fff;
    border-bottom: 2px solid #2fb5d2;
}

.lang-tabs .nav-link:hover:not(.active) {
    color: #232323;
    background: #e9ecef;
}

.lang-tabs .tab-content {
    padding: 0.75rem;
    background: #fff;
}

.lang-tabs .tab-pane .form-control {
    border: none;
    padding: 0;
    box-shadow: none;
}

.lang-tabs .tab-pane .form-control:focus {
    box-shadow: none;
}

/* Tiers Table */
#tiersTable {
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

#tiersTable th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.75rem 0.5rem;
    border-bottom: 2px solid #dee2e6;
}

#tiersTable td {
    padding: 0.5rem;
    vertical-align: middle;
}

#tiersTable .form-control {
    font-size: 0.875rem;
    padding: 0.375rem 0.5rem;
}

#tiersTable .tier-saving .badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.5rem;
}

#tiersTable .remove-tier {
    padding: 0.25rem 0.5rem;
    line-height: 1;
}

#tiersTable .remove-tier i {
    font-size: 1rem;
}

/* Input Groups */
.input-group-text {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    background: #f8f9fa;
    border: 1px solid #ced4da;
}

/* Pricing Preview */
.pricing-preview {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 4px;
}

.pricing-preview h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #2e7d32;
}

.pricing-preview table {
    margin-bottom: 0;
    font-size: 0.8rem;
}

.pricing-preview .table-success {
    background: #c8e6c9 !important;
}

/* Form Footer */
.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid #e5e5e5;
}

.form-footer .btn {
    min-width: 140px;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.form-footer .btn i {
    font-size: 1.1rem;
}

.form-footer .btn-primary {
    background: #2fb5d2;
    border-color: #2fb5d2;
}

.form-footer .btn-primary:hover {
    background: #28a1bc;
    border-color: #28a1bc;
}

/* Required Field Indicator */
.form-control-label.required::after {
    content: " *";
    color: #e74c3c;
}

/* Custom Switch */
.custom-switch {
    padding-left: 2.5rem;
}

.custom-switch .custom-control-label {
    font-weight: normal;
    cursor: pointer;
}

.custom-switch .custom-control-label::before {
    left: -2.5rem;
    width: 2rem;
    border-radius: 1rem;
    background-color: #dee2e6;
    border: none;
}

.custom-switch .custom-control-input:checked ~ .custom-control-label::before {
    background-color: #2fb5d2;
}

.custom-switch .custom-control-label::after {
    left: calc(-2.5rem + 2px);
    width: calc(1rem - 4px);
    height: calc(1rem - 4px);
    border-radius: 50%;
    background-color: #fff;
}

.custom-switch .custom-control-input:checked ~ .custom-control-label::after {
    transform: translateX(1rem);
}

/* Offer Cards */
.offer-card {
    transition: box-shadow 0.2s ease;
}

.offer-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.offer-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #232323;
    margin-bottom: 8px;
}

.offer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
}

.offer-price {
    font-weight: 700;
    color: #2e7d32;
    font-size: 1.1rem;
}

.admin-note {
    background: #fff3cd;
    border-color: #ffc107;
    font-size: 0.9rem;
}

/* Badges */
.badge-warning {
    background: #ffc107;
    color: #212529;
}

.badge-success {
    background: #28a745;
    color: #fff;
}

.badge-danger {
    background: #dc3545;
    color: #fff;
}

.badge-info {
    background: #17a2b8;
    color: #fff;
}

.psm-marketplace-volume-pricing{

margin: 15px auto;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  float: none;
  margin-top: 36px;
  display: block;
  overflow: hidden;

}

/* Responsive */
@media (max-width: 767px) {
    .psm-marketplace-account-links a {
        padding: 10px;
    }
    
    .psm-marketplace-account-links .link-item {
        padding: 15px;
    }
    
    .offer-actions .btn {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
    
    .form-footer {
        flex-direction: column;
    }
    
    .form-footer .btn {
        width: 100%;
    }
}

/* Modern Image Upload */
.image-upload-wrapper {
    width: 100%;
}

.image-upload-dropzone {
    position: relative;
    border: 2px dashed #d0d0d0;
    border-radius: 12px;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.image-upload-dropzone:hover {
    border-color: #2fb5d2;
    background: #f0fafc;
}

.image-upload-dropzone.dragover {
    border-color: #2fb5d2;
    background: #e6f7fa;
    transform: scale(1.01);
}

.image-upload-dropzone.banner-dropzone {
    min-height: 150px;
    aspect-ratio: 4 / 1;
}

.image-upload-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    pointer-events: none;
}

.upload-placeholder i {
    font-size: 3rem;
    color: #b0b0b0;
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
}

.image-upload-dropzone:hover .upload-placeholder i {
    color: #2fb5d2;
}

.upload-placeholder .upload-text {
    font-size: 0.95rem;
    color: #555;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.upload-placeholder .upload-hint {
    font-size: 0.8rem;
    color: #888;
}

.image-preview {
    position: relative;
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.image-preview.banner-preview {
    width: 100%;
    height: auto;
    max-height: 150px;
    padding: 15px;
}

.image-preview.banner-preview img {
    width: 100%;
    max-height: 120px;
    object-fit: cover;
}

.image-remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.9);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 3;
    padding: 0;
}

.image-remove-btn:hover {
    background: #dc3545;
    transform: scale(1.1);
}

.image-remove-btn i {
    font-size: 18px;
}

/* Multi-image Upload */
.multi-upload-dropzone {
    min-height: 200px;
    flex-direction: column;
}

.multi-upload-dropzone .upload-placeholder {
    width: 100%;
}

.multi-image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 15px;
    width: 100%;
}

.multi-preview-item {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.multi-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.multi-remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.9);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.multi-remove-btn:hover {
    background: #dc3545;
    transform: scale(1.1);
}

.multi-remove-btn i {
    font-size: 16px;
}

/* Existing images grid */
.existing-images-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.existing-image-item {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    border: 2px solid #e5e5e5;
}

.existing-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.psm-marketplace-dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.psm-marketplace-dashboard-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
}

.psm-marketplace-dashboard-card .card-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #232323;
}

.psm-marketplace-dashboard-card .card-label {
    font-size: 0.85rem;
    color: #999;
    margin-top: 0.25rem;
}

.psm-marketplace-dashboard-chart {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

/* ========================================
   Vendor List
   ======================================== */
.psm-marketplace-vendor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.psm-marketplace-vendor-card {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s;
    background: #fff;
}

.psm-marketplace-vendor-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.psm-marketplace-vendor-card .vendor-card-logo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e5e5;
}

.psm-marketplace-vendor-card .vendor-card-body {
    padding: 1.25rem;
}

.psm-marketplace-vendor-card .vendor-card-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.psm-marketplace-vendor-card .vendor-card-name a {
    color: #232323;
    text-decoration: none;
}

.psm-marketplace-vendor-card .vendor-card-meta {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

/* ========================================
   Vendor Reviews
   ======================================== */
.psm-marketplace-review-form {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.psm-marketplace-star-rating {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 2px;
}

.psm-marketplace-star-rating input {
    display: none;
}

.psm-marketplace-star-rating label {
    cursor: pointer;
    font-size: 24px;
    color: #ccc;
    transition: color 0.15s;
}

.psm-marketplace-star-rating label:hover,
.psm-marketplace-star-rating label:hover ~ label,
.psm-marketplace-star-rating input:checked ~ label {
    color: #ffc107;
}

.psm-marketplace-review-item {
    border-bottom: 1px solid #eee;
    padding: 1rem 0;
}

.psm-marketplace-review-item:last-child {
    border-bottom: none;
}

.psm-marketplace-review-stars {
    display: inline-flex;
    gap: 1px;
}

.psm-marketplace-review-stars i {
    font-size: 14px;
    color: #ffc107;
}

.psm-marketplace-rating-distribution {
    max-width: 300px;
}

.psm-marketplace-rating-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 0.85rem;
}

.psm-marketplace-rating-bar .bar-fill {
    flex: 1;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.psm-marketplace-rating-bar .bar-fill span {
    display: block;
    height: 100%;
    background: #ffc107;
    border-radius: 4px;
}

.psm-marketplace-stock-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.psm-marketplace-stock-modal {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    width: 400px;
    max-width: 90vw;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.psm-marketplace-stock-modal h4 {
    margin-bottom: 1rem;
}

.psm-marketplace-stock-modal input[type="number"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.psm-marketplace-stock-modal .btn-group {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.psm-marketplace-shop-sort-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f8f8f8;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.psm-marketplace-shop-sort-bar select {
    padding: 0.35rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Vacation mode banner */
.psm-marketplace-vacation-banner {
    background: #fff3cd;
    border: 1px solid #ffecb5;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.psm-marketplace-vacation-banner i {
    color: #856404;
    font-size: 24px;
}


.psm-marketplace-submit-offer {
  padding: 20px;
  border: 1px solid #e0e4e7;
  background: #fff;
}

#features-container {
  background: #e7f5ed;
  padding: 10px;
  margin: -10px;
    margin-bottom: -10px;
  border-radius: 7px;
  margin-bottom: 10px;
}