/* =============================================================================
   PSM Elementor Widgets Styles
   ============================================================================= */

/* =============================================================================
   Simple Visual Field Styles - Inline Progress Bars
   ============================================================================= */

.psm-simple-visual-field {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 8px 0 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    min-height: 40px !important;
    position: relative !important;
    z-index: 1 !important;
}

.psm-simple-visual-field:hover {
    z-index: 999998 !important;
}

.psm-simple-numeric {
    flex-shrink: 0 !important;
    min-width: 80px !important;
    display: flex !important;
    align-items: baseline !important;
    gap: 4px !important;
}

.psm-simple-value {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #2c3e50 !important;
    line-height: 1.2 !important;
}

.psm-simple-unit {
    font-size: 12px !important;
    color: #7f8c8d !important;
    font-weight: 500 !important;
}

.psm-simple-progress {
    flex: 1 !important;
    min-width: 120px !important;
    position: relative !important;
    z-index: 1 !important;
}

.psm-simple-progress:hover {
    z-index: 999999 !important;
}

.psm-simple-progress-bar {
    background: #ecf0f1 !important;
    height: 10px !important;
    border-radius: 5px !important;
    overflow: hidden !important;
    position: relative !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    margin-bottom: 4px !important;
    cursor: help !important;
    transition: all 0.3s ease !important;
}

.psm-simple-progress-bar:hover {
    transform: scale(1.02) !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.psm-simple-progress-fill {
    height: 100% !important;
    border-radius: 5px !important;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Progress Bar Level Colors - 5 Levels */
/* Very Low Level */
.psm-simple-progress-fill.level-very_low {
    background: linear-gradient(90deg, #e74c3c 0%, #c0392b 100%) !important;
}

/* Low Level */
.psm-simple-progress-fill.level-low {
    background: linear-gradient(90deg, #e67e22 0%, #d68910 100%) !important;
}

/* Medium Level */
.psm-simple-progress-fill.level-medium {
    background: linear-gradient(90deg, #f39c12 0%, #e67e22 100%) !important;
}

/* High Level */
.psm-simple-progress-fill.level-high {
    background: linear-gradient(90deg, #2ecc71 0%, #27ae60 100%) !important;
}

/* Very High Level */
.psm-simple-progress-fill.level-very_high {
    background: linear-gradient(90deg, #27ae60 0%, #229954 100%) !important;
}

/* Inverse Field Colors (for water absorption, abrasion, porosity) */
.psm-simple-progress-fill.level-very_low.inverse {
    background: linear-gradient(90deg, #27ae60 0%, #229954 100%) !important; /* Green for very low (good) */
}

.psm-simple-progress-fill.level-low.inverse {
    background: linear-gradient(90deg, #2ecc71 0%, #27ae60 100%) !important; /* Light green for low (good) */
}

.psm-simple-progress-fill.level-medium.inverse {
    background: linear-gradient(90deg, #f39c12 0%, #e67e22 100%) !important; /* Orange stays same */
}

.psm-simple-progress-fill.level-high.inverse {
    background: linear-gradient(90deg, #e67e22 0%, #d68910 100%) !important; /* Dark orange for high (bad) */
}

.psm-simple-progress-fill.level-very_high.inverse {
    background: linear-gradient(90deg, #e74c3c 0%, #c0392b 100%) !important; /* Red for very high (bad) */
}

/* Animation for progress bars */
@keyframes psm-progress-shine {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
    100% { transform: translateX(100%); }
}

.psm-simple-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%
    );
    background-size: 20px 20px;
    animation: psm-progress-shine 2s linear infinite;
}

.psm-simple-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%
    );
    background-size: 20px 20px;
    animation: psm-progress-shine 2s linear infinite;
}

@keyframes psm-progress-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Professional Portal-based Tooltip System */
.psm-pro-tooltip {
    position: relative !important;
    cursor: help !important;
    transition: all 0.3s ease !important;
}

.psm-pro-tooltip:hover {
    transform: scale(1.02) !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* Global Tooltip Portal */
#psm-tooltip-portal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    pointer-events: none !important;
    z-index: 2147483647 !important; /* Maximum z-index */
}

.psm-portal-tooltip {
    position: fixed !important;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #2c3e50 100%) !important;
    color: white !important;
    padding: 12px 16px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 2147483647 !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7) !important;
    letter-spacing: 0.5px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    pointer-events: none !important;
    transform: scale(0.8) !important;
}

.psm-portal-tooltip.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: scale(1) !important;
}

.psm-portal-tooltip::after {
    content: '' !important;
    position: absolute !important;
    top: 100% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    border: 6px solid transparent !important;
    border-top-color: #2c3e50 !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2)) !important;
}

.psm-portal-tooltip.below::after {
    top: -12px !important;
    bottom: auto !important;
    border-top-color: transparent !important;
    border-bottom-color: #2c3e50 !important;
}

/* Level-specific tooltip colors - Normal Fields (higher = better = orange) */
.psm-portal-tooltip.level-very_low:not(.inverse) {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 50%, #e74c3c 100%) !important;
}

.psm-portal-tooltip.level-very_low:not(.inverse)::after {
    border-top-color: #e74c3c !important;
}

.psm-portal-tooltip.level-very_low:not(.inverse).below::after {
    border-bottom-color: #e74c3c !important;
    border-top-color: transparent !important;
}

.psm-portal-tooltip.level-low:not(.inverse) {
    background: linear-gradient(135deg, #e67e22 0%, #d68910 50%, #e67e22 100%) !important;
}

.psm-portal-tooltip.level-low:not(.inverse)::after {
    border-top-color: #e67e22 !important;
}

.psm-portal-tooltip.level-low:not(.inverse).below::after {
    border-bottom-color: #e67e22 !important;
    border-top-color: transparent !important;
}

.psm-portal-tooltip.level-medium {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 50%, #f39c12 100%) !important;
}

.psm-portal-tooltip.level-medium::after {
    border-top-color: #f39c12 !important;
}

.psm-portal-tooltip.level-medium.below::after {
    border-bottom-color: #f39c12 !important;
    border-top-color: transparent !important;
}

.psm-portal-tooltip.level-high:not(.inverse) {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 50%, #f39c12 100%) !important;
}

.psm-portal-tooltip.level-high:not(.inverse)::after {
    border-top-color: #f39c12 !important;
}

.psm-portal-tooltip.level-high:not(.inverse).below::after {
    border-bottom-color: #f39c12 !important;
    border-top-color: transparent !important;
}

.psm-portal-tooltip.level-very_high:not(.inverse) {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 50%, #f39c12 100%) !important;
}

.psm-portal-tooltip.level-very_high:not(.inverse)::after {
    border-top-color: #f39c12 !important;
}

.psm-portal-tooltip.level-very_high:not(.inverse).below::after {
    border-bottom-color: #f39c12 !important;
    border-top-color: transparent !important;
}

/* Level-specific tooltip colors - Inverse Fields (lower = better = green) */
.psm-portal-tooltip.level-very_low.inverse {
    background: linear-gradient(135deg, #27ae60 0%, #229954 50%, #27ae60 100%) !important;
}

/* Override with higher specificity for inverse tooltips */
html body #psm-tooltip-portal .psm-portal-tooltip.level-very_low.inverse,
body .psm-portal-tooltip.level-very_low.inverse.psm-portal-tooltip,
.psm-portal-tooltip.level-very_low.inverse.psm-portal-tooltip.level-very_low {
    background: linear-gradient(135deg, #27ae60 0%, #229954 50%, #27ae60 100%) !important;
}

.psm-portal-tooltip.level-very_low.inverse::after {
    border-top-color: #27ae60 !important;
}

.psm-portal-tooltip.level-very_low.inverse.below::after {
    border-bottom-color: #27ae60 !important;
    border-top-color: transparent !important;
}

.psm-portal-tooltip.level-low.inverse {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 50%, #2ecc71 100%) !important;
}

.psm-portal-tooltip.level-low.inverse::after {
    border-top-color: #2ecc71 !important;
}

.psm-portal-tooltip.level-low.inverse.below::after {
    border-bottom-color: #2ecc71 !important;
    border-top-color: transparent !important;
}

.psm-portal-tooltip.level-high.inverse {
    background: linear-gradient(135deg, #e67e22 0%, #d68910 50%, #e67e22 100%) !important;
}

.psm-portal-tooltip.level-high.inverse::after {
    border-top-color: #e67e22 !important;
}

.psm-portal-tooltip.level-high.inverse.below::after {
    border-bottom-color: #e67e22 !important;
    border-top-color: transparent !important;
}

.psm-portal-tooltip.level-very_high.inverse {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 50%, #e74c3c 100%) !important;
}

.psm-portal-tooltip.level-very_high.inverse::after {
    border-top-color: #e74c3c !important;
}

.psm-portal-tooltip.level-very_high.inverse.below::after {
    border-bottom-color: #e74c3c !important;
    border-top-color: transparent !important;
}

/* Additional high specificity overrides for inverse tooltips */
html body .psm-portal-tooltip.level-very_low.inverse,
html body .psm-portal-tooltip.inverse.level-very_low {
    background: linear-gradient(135deg, #27ae60 0%, #229954 50%, #27ae60 100%) !important;
}

html body .psm-portal-tooltip.level-low.inverse,
html body .psm-portal-tooltip.inverse.level-low {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 50%, #2ecc71 100%) !important;
}

/* Animation for tooltip */
@keyframes tooltipSlideIn {
    0% {
        opacity: 0;
        transform: scale(0.7) translateY(10px);
    }
    60% {
        opacity: 1;
        transform: scale(1.05) translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.psm-portal-tooltip.show {
    animation: tooltipSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

/* RTL Support */
.rtl .psm-simple-visual-field {
    direction: rtl !important;
}

.rtl .psm-simple-numeric {
    flex-direction: row-reverse !important;
}

.rtl .psm-simple-unit {
    margin-right: 0 !important;
    margin-left: 4px !important;
}

.rtl .psm-portal-tooltip {
    direction: rtl !important;
    font-family: 'IRANSans', 'Vazir', 'Tahoma', sans-serif !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .psm-simple-visual-field {
        gap: 8px !important;
        min-height: 35px !important;
    }
    
    .psm-simple-numeric {
        min-width: 70px !important;
    }
    
    .psm-simple-value {
        font-size: 14px !important;
    }
    
    .psm-simple-unit {
        font-size: 11px !important;
    }
    
    .psm-simple-progress-bar {
        height: 8px !important;
    }
    
    .psm-portal-tooltip {
        font-size: 11px !important;
        padding: 10px 14px !important;
    }
}

/* =============================================================================
   Archive Toolbar Styles - WooCommerce-like Interface
   ============================================================================= */

.psm-archive-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid #e1e5e9;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Grid Gap Zero Support */
.psm-product-grid[style*="gap: 0"] {
    gap: 0 !important;
    grid-gap: 0 !important;
    grid-row-gap: 0 !important;
    grid-column-gap: 0 !important;
}

.psm-product-grid[style*="gap: 0px"] {
    gap: 0 !important;
    grid-gap: 0 !important;
    grid-row-gap: 0 !important;
    grid-column-gap: 0 !important;
}

.psm-product-grid[style*="gap: 0px"] .psm-product-card {
    margin: 0 !important;
}

/* Toolbar Loading State */
.psm-product-grid.psm-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.psm-product-grid.psm-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Update animation for real-time changes */
.psm-simple-progress-fill.psm-updating {
    transform: scale(1.02) !important;
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.4) !important;
    animation: psm-update-pulse 1.2s ease-out !important;
}

@keyframes psm-update-pulse {
    0% { 
        transform: scale(1);
        box-shadow: 0 0 0 rgba(52, 152, 219, 0);
    }
    50% { 
        transform: scale(1.03);
        box-shadow: 0 0 20px rgba(52, 152, 219, 0.6);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 0 0 rgba(52, 152, 219, 0);
    }
}

/* =============================================================================
   Current Product Terms Widget Styles
   ============================================================================= */

.psm-current-terms-container {
    width: 100%;
    max-width: 100%;
}

.psm-current-terms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
}

.psm-current-term-item {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e1e5e9;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    overflow: hidden;
}

.psm-current-term-item:hover {
    text-decoration: none;
    color: inherit;
}

.psm-current-term-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 0 auto 15px;
    font-size: 24px;
}

.psm-current-term-icon img {
    width: 100%;
    height: 100%;
   }

.psm-current-term-title {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: #2c3e50;
    text-align: center;
}

.psm-current-term-count {
    font-size: 14px;
    color: #666666;
    text-align: center;
    margin: 5px 0;
    background: #f8f9fa;
    padding: 4px 12px;
    border-radius: 12px;
    display: inline-block;
    width: 100%;
}

.psm-current-term-description {
    font-size: 14px;
    color: #888888;
    line-height: 1.5;
    margin: 10px 0 0;
    text-align: center;
}

.psm-no-terms {
    text-align: center;
    padding: 40px 20px;
    color: #666666;
    font-style: italic;
}

.psm-editor-message {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    color: #856404;
    font-style: normal;
}

/* Equal Height Cards */
.psm-cards-height-equal .psm-current-terms-grid {
    grid-auto-rows: 1fr;
}

.psm-cards-height-equal .psm-current-term-item {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Hover Animations */
.psm-hover-lift .psm-current-term-item:hover {
    transform: translateY(-5px);
}

.psm-hover-scale .psm-current-term-item:hover {
    transform: scale(1.05);
}

.psm-hover-shadow .psm-current-term-item:hover {
    box-shadow: 0 8px 25px rgba(0, 124, 186, 0.15);
}

/* Responsive Design */
@media (max-width: 768px) {
    .psm-current-terms-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .psm-current-term-item {
        padding: 15px;
    }
    
    .psm-current-term-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
        margin-bottom: 12px;
    }
    
    .psm-current-term-title {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .psm-current-terms-grid {
        gap: 12px;
    }
    
    .psm-current-term-item {
        padding: 12px;
    }
    
    .psm-current-term-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .psm-current-term-title {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .psm-current-term-count {
        font-size: 13px;
        padding: 3px 10px;
    }
    
    .psm-current-term-description {
        font-size: 13px;
    }
}

/* =============================================================================
   Product Gallery Carousel Widget Styles
   ============================================================================= */

.psm-gallery-carousel-container {
    position: relative;
    width: 100%;
}

.psm-main-carousel {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.psm-main-carousel .swiper-slide {
    position: relative;
}

.psm-image-container {
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
}

.psm-image-container img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

/* Zoom enabled styling */
.zoom-enabled .psm-image-container {
    overflow: hidden;
    cursor: zoom-in;
}

.zoom-enabled .psm-image-container img {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center center;
}

/* Lightbox icon */
.psm-lightbox-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.psm-image-container:hover .psm-lightbox-icon {
    opacity: 1;
}

.psm-lightbox-icon:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

/* Navigation arrows */
.psm-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
    font-size: 18px;
    color: #333;
}

.psm-gallery-carousel-container:hover .psm-arrow {
    opacity: 1;
}

.psm-arrow-prev {
    left: 15px;
}

.psm-arrow-next {
    right: 15px;
}

.psm-arrow:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

/* Pagination */
.psm-pagination {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.psm-pagination .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.psm-pagination .swiper-pagination-bullet-active {
    background: #007cba;
    transform: scale(1.2);
}

/* Thumbnail carousel */
.psm-thumbnail-carousel-container {
    margin-top: 15px;
}

.psm-thumbnail-carousel .swiper-slide {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    border-radius: 4px;
    overflow: hidden;
}

.psm-thumbnail-carousel .swiper-slide-thumb-active {
    opacity: 1;
    box-shadow: 0 0 0 2px #007cba;
}

.psm-thumbnail-carousel img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
}

/* Lightbox styles */
.psm-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.psm-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.psm-lightbox-close {
    position: absolute;
    top: -45px;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    cursor: pointer;
    z-index: 1;
    transition: all 0.3s ease;
}

.psm-lightbox-close:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

/* Responsive design */
@media (max-width: 768px) {
    .psm-arrow {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .psm-arrow-prev {
        left: 10px;
    }
    
    .psm-arrow-next {
        right: 10px;
    }
    
    .psm-lightbox-icon {
        width: 35px;
        height: 35px;
        top: 10px;
        right: 10px;
    }
    
    .psm-thumbnail-carousel img {
        height: 60px;
    }
}

/* =============================================================================
   Quality Grade Styling
   ============================================================================= */

.psm-quality-grade {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0; /* Remove padding */
    border: none; /* Remove border */
    background: none; /* Remove background */
    transition: all 0.3s ease;
}

.psm-quality-grade:hover {
    background: none; /* Remove hover background */
    border: none; /* Remove hover border */
    box-shadow: none; /* Remove hover shadow */
}

.psm-grade-stars {
    display: inline-flex;
    gap: 3px;
    cursor: help;
}

.psm-grade-stars i {
    font-size: 30px; /* Set icon size to 30px */
    color: #B8860B; /* Dark gold color */
    transition: transform 0.2s ease;
}

/* Specific styling for filled and empty stars */
.psm-grade-stars i.filled {
    color: #B8860B; /* Dark gold for filled stars */
}

.psm-grade-stars i.empty {
    color: #D3D3D3; /* Light gray for empty stars */
}

.psm-grade-stars:hover i {
    transform: scale(1.1);
}

.psm-economic-icon {
    cursor: help;
    transition: transform 0.2s ease;
}

.psm-economic-icon i {
    font-size: 30px; /* Set icon size to 30px */
    color: #B8860B; /* Dark gold color */
}

.psm-economic-icon:hover {
    transform: scale(1.1);
}

.psm-grade-text {
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
    display: none; /* Hide text, show only icons */
}

/* Remove grade specific backgrounds and borders since we don't want boxes */
.psm-quality-grade[data-grade="grade-1"] {
    background: none;
    border: none;
}

.psm-quality-grade[data-grade="grade-2"] {
    background: none;
    border: none;
}

.psm-quality-grade[data-grade="grade-3"] {
    background: none;
    border: none;
}

.psm-quality-grade[data-grade="economic"] {
    background: none;
    border: none;
}

/* Responsive design */
@media (max-width: 480px) {
    .psm-quality-grade {
        gap: 3px;
        padding: 0; /* Keep no padding on mobile */
    }
    
    .psm-grade-stars i {
        font-size: 30px; /* Keep 30px on mobile too */
        color: #B8860B; /* Maintain dark gold color */
    }
    
    .psm-economic-icon i {
        font-size: 30px; /* Keep 30px on mobile too */
        color: #B8860B; /* Maintain dark gold color */
    }
}

/* Quality Rating Styles */
.psm-quality-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
    cursor: help;
}

.psm-quality-rating:hover {
    background: rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.2);
}

.psm-quality-rating i {
    font-size: 30px; /* 30px to match request */
    transition: all 0.2s ease;
}

.psm-quality-rating i.filled {
    color: #B8860B; /* Dark gold to match other elements */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.psm-quality-rating i.empty {
    color: #D3D3D3; /* Light gray for empty stars */
}

.psm-quality-rating:hover i.filled {
    color: #B8860B; /* Keep same dark gold on hover */
    transform: scale(1.1);
}

.psm-quality-rating:hover i.empty {
    color: #ccc;
}

/* Rating level specific styles */
.psm-quality-rating[data-rating="1"] {
    background: rgba(255, 99, 71, 0.1);
    border-color: rgba(255, 99, 71, 0.3);
}

.psm-quality-rating[data-rating="1"]:hover {
    background: rgba(255, 99, 71, 0.15);
    border-color: rgba(255, 99, 71, 0.5);
    box-shadow: 0 2px 8px rgba(255, 99, 71, 0.2);
}

.psm-quality-rating[data-rating="2"] {
    background: rgba(255, 165, 0, 0.1);
    border-color: rgba(255, 165, 0, 0.3);
}

.psm-quality-rating[data-rating="2"]:hover {
    background: rgba(255, 165, 0, 0.15);
    border-color: rgba(255, 165, 0, 0.5);
    box-shadow: 0 2px 8px rgba(255, 165, 0, 0.2);
}

.psm-quality-rating[data-rating="4"] {
    background: rgba(50, 205, 50, 0.1);
    border-color: rgba(50, 205, 50, 0.3);
}

.psm-quality-rating[data-rating="4"]:hover {
    background: rgba(50, 205, 50, 0.15);
    border-color: rgba(50, 205, 50, 0.5);
    box-shadow: 0 2px 8px rgba(50, 205, 50, 0.2);
}

.psm-quality-rating[data-rating="5"] {
    background: rgba(0, 128, 0, 0.1);
    border-color: rgba(0, 128, 0, 0.3);
}

.psm-quality-rating[data-rating="5"]:hover {
    background: rgba(0, 128, 0, 0.15);
    border-color: rgba(0, 128, 0, 0.5);
    box-shadow: 0 2px 8px rgba(0, 128, 0, 0.2);
}

/* Responsive design for rating */
@media (max-width: 480px) {
    .psm-quality-rating {
        gap: 2px;
        padding: 3px 6px;
    }
    
    .psm-quality-rating i {
        font-size: 14px;
    }
}

/* Admin Quality Grade Dropdown Styles */
.psm-quality-grade-selector {
    position: relative;
    width: 300px;
}

.psm-custom-dropdown {
    position: relative;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    user-select: none;
}

.psm-dropdown-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    min-height: 36px;
    background: #fff;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.psm-dropdown-selected:hover {
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
}

.psm-dropdown-arrow {
    color: #666;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.psm-custom-dropdown.open .psm-dropdown-arrow {
    transform: rotate(180deg);
}

.psm-dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
}

.psm-dropdown-option {
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.psm-dropdown-option:last-child {
    border-bottom: none;
}

.psm-dropdown-option:hover {
    background-color: #f5f5f5;
}

.psm-dropdown-option.active {
    background-color: #e6f3ff;
    color: #007cba;
}

.psm-grade-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.psm-grade-stars {
    display: flex;
    gap: 2px;
}

.psm-grade-stars i.filled {
    color: #B8860B; /* Dark gold to match updated styling */
    font-size: 30px; /* 30px size */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.psm-grade-stars i.empty {
    color: #D3D3D3; /* Light gray for empty stars */
    font-size: 30px; /* 30px size */
}

.psm-economic-icon i {
    color: #B8860B; /* Dark gold to match */
    font-size: 30px; /* 30px size */
    
}

.psm-grade-text {
    font-weight: 500;
    color: #333;
    display: none; /* Hide text, show only icons */
}

.psm-grade-placeholder {
    color: #999;
    font-style: italic;
}

/* Responsive design for admin dropdown */
@media (max-width: 782px) {
    .psm-quality-grade-selector {
        width: 100%;
    }
    
    .psm-grade-stars i {
        font-size: 14px;
    }
    
    .psm-economic-icon i {
        font-size: 14px;
    }
}
