/*
 * Enhanced Product Form Styles
 * Modern, clean, and user-friendly design
 */

/* Main Container */
#epf-product-form-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px 40px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

@media (max-width: 768px) {
    #epf-product-form-container {
        padding: 20px 15px;
    }
}

/* Form Sections */
.epf-form-section {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.epf-section-header {
    background: #f8f9fa;
    padding: 16px 24px;
    border-bottom: 1px solid #e5e5e5;
}

.epf-section-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.epf-form-section .epf-field-group {
    padding: 24px;
}

/* Icons */
.epf-icon-title::before { content: "📝"; }
.epf-icon-pricing::before { content: "💰"; }
.epf-icon-media::before { content: "📷"; }
.epf-icon-category::before { content: "🏷️"; }
.epf-icon-info::before { content: "ℹ️"; }
.epf-icon-inventory::before { content: "📦"; }
.epf-icon-location::before { content: "📍"; }
.epf-icon-delivery::before { content: "🚚"; }
.epf-icon-returns::before { content: "↩️"; }
.epf-icon-promote::before { content: "📢"; }
.epf-icon-upload::before { content: "⬆️"; }
.epf-icon-video::before { content: "🎥"; }
.epf-icon-preview::before { content: "👁️"; }
.epf-icon-save::before { content: "💾"; }
.epf-icon-list::before { content: "📋"; }

/* Form Elements */
.epf-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.epf-label.required::after {
    content: " *";
    color: #e74c3c;
}

.epf-input,
.epf-select,
.epf-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.epf-input:focus,
.epf-select:focus,
.epf-textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.epf-input::placeholder {
    color: #95a5a6;
    font-style: italic;
}

/* Character Counters */
.epf-char-counter {
    text-align: right;
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 4px;
}

.epf-char-counter.over-limit {
    color: #e74c3c;
    font-weight: 600;
}

/* Help Text */
.epf-help-text {
    font-size: 13px;
    color: #7f8c8d;
    margin-top: 8px;
    line-height: 1.4;
}

.epf-help-text.epf-large-help {
    font-size: 14px;
    color: #5a6c7d;
}

/* Pricing Section */
.epf-pricing-fields {
    padding: 24px;
}

.epf-price-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.epf-field-third {
    flex: 1;
}

.epf-price-input-wrapper {
    position: relative;
}

.epf-currency {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 600;
    color: #2c3e50;
    z-index: 2;
    pointer-events: none;
    font-size: 14px;
}

.epf-price-input {
    padding-left: 35px;
    min-width: 120px;
    width: 100%;
    text-align: right;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-variant-numeric: tabular-nums;
}

.epf-number-input {
    min-width: 100px;
    width: 100%;
    max-width: 200px;
    text-align: right;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-variant-numeric: tabular-nums;
}

/* Ensure numeric inputs have proper font rendering */
input[type="number"] {
    -moz-appearance: textfield;
    font-variant-numeric: tabular-nums;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Improve the layout for price fields */
.epf-price-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.epf-price-row .epf-field-group {
    min-width: 180px;
    flex: 1;
}

.epf-free-option {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    border: 2px solid #e5e5e5;
}

/* Checkbox Styling */
.epf-checkbox-wrapper {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    color: #2c3e50;
}

.epf-checkbox-wrapper input[type="checkbox"] {
    display: none;
}

.epf-checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #3498db;
    border-radius: 4px;
    margin-right: 12px;
    position: relative;
    transition: all 0.3s ease;
}

.epf-checkbox-wrapper input[type="checkbox"]:checked + .epf-checkmark {
    background: #3498db;
}

.epf-checkbox-wrapper input[type="checkbox"]:checked + .epf-checkmark::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

/* Media Upload */
.epf-media-upload-area {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.epf-upload-dropzone {
    border: 3px dashed #bdc3c7;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    transition: border-color 0.3s ease, background-color 0.3s ease;
    cursor: pointer;
}

.epf-upload-dropzone:hover {
    border-color: #3498db;
    background-color: #f8f9fa;
}

.epf-upload-dropzone.dragover {
    border-color: #2ecc71;
    background-color: #d5f4e6;
}

.epf-upload-placeholder i {
    font-size: 48px;
    color: #bdc3c7;
    margin-bottom: 16px;
}

.epf-upload-placeholder p {
    margin: 8px 0;
    color: #5a6c7d;
}

.epf-upload-formats {
    font-size: 12px;
    color: #95a5a6;
}

/* Image Preview */
.epf-sortable-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.epf-image-preview {
    position: relative;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    cursor: move;
    transition: transform 0.2s ease;
}

.epf-image-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.epf-image-preview img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.epf-image-preview.main-image {
    border-color: #3498db;
}

.epf-image-preview.main-image::before {
    content: "Main";
    position: absolute;
    top: 4px;
    left: 4px;
    background: #3498db;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

.epf-remove-image {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: rgba(231, 76, 60, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Category and Condition */
.epf-category-condition-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 24px;
    align-items: start;
}

.epf-field-half {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.epf-field-half .epf-label {
    margin-bottom: 8px;
}

.epf-field-half .epf-select {
    margin-bottom: 8px;
}

.epf-category-select {
    background: white;
    cursor: pointer;
}

/* WYSIWYG Editor */
.epf-wysiwyg-wrapper {
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    overflow: hidden;
}

.epf-wysiwyg-wrapper:focus-within {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Delivery Options */
.epf-delivery-compact {
    padding: 24px;
}

.epf-delivery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.epf-delivery-option {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 6px;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.epf-delivery-option:hover {
    border-color: #3498db;
}

.epf-checkbox-wrapper.epf-compact {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.epf-delivery-label {
    display: flex;
    flex-direction: column;
}

.epf-delivery-label strong {
    color: #2c3e50;
    margin-bottom: 2px;
}

.epf-delivery-label small {
    color: #7f8c8d;
    font-size: 12px;
}

/* Returns Policy */
.epf-returns-policy {
    padding: 24px;
}

.epf-returns-info {
    background: #e8f6f3;
    padding: 16px;
    border-radius: 6px;
    border-left: 4px solid #27ae60;
}

.epf-returns-info p {
    margin: 0;
    color: #2c3e50;
    font-size: 14px;
}

/* Advertising Options */
.epf-advertising-options {
    padding: 24px;
}

.epf-promo-option {
    background: #f8f9fa;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    margin-bottom: 12px;
    padding: 16px;
    transition: border-color 0.3s ease;
}

.epf-promo-option:hover {
    border-color: #3498db;
}

.epf-radio-wrapper {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.epf-radio-wrapper input[type="radio"] {
    display: none;
}

.epf-radio-mark {
    width: 20px;
    height: 20px;
    border: 2px solid #3498db;
    border-radius: 50%;
    margin-right: 12px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.epf-radio-wrapper input[type="radio"]:checked + .epf-radio-mark {
    background: #3498db;
    border-color: #3498db;
}

.epf-radio-wrapper input[type="radio"]:checked + .epf-radio-mark::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    display: block;
}

.epf-promo-details {
    display: flex;
    flex-direction: column;
}

.epf-promo-details strong {
    color: #2c3e50;
    margin-bottom: 2px;
}

.epf-promo-details small {
    color: #7f8c8d;
    font-size: 12px;
}

/* Form Actions */
.epf-form-actions {
    background: #f8f9fa;
    padding: 24px;
    border-radius: 8px;
    margin-top: 32px;
    border: 1px solid #e5e5e5;
}

.epf-action-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    max-width: 800px;
    margin: 0 auto;
}

.epf-btn {
    padding: 14px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    min-width: 160px;
    justify-content: center;
}

.epf-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.epf-btn-primary {
    background: #27ae60;
    color: white;
}

.epf-btn-primary:hover:not(:disabled) {
    background: #219a52;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
}

.epf-btn-secondary {
    background: #3498db;
    color: white;
}

.epf-btn-secondary:hover:not(:disabled) {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.epf-btn-tertiary {
    background: #95a5a6;
    color: white;
}

.epf-btn-tertiary:hover:not(:disabled) {
    background: #7f8c8d;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(149, 165, 166, 0.3);
}

/* Loading Overlay */
.epf-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 62, 80, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    color: white;
}

.epf-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: epf-spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes epf-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal */
.epf-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.epf-modal-content {
    background: white;
    border-radius: 8px;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.epf-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.epf-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #2c3e50;
}

.epf-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #7f8c8d;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.epf-modal-close:hover {
    color: #e74c3c;
}

.epf-modal-body {
    padding: 24px;
}

.epf-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #e5e5e5;
    display: flex;
    gap: 16px;
    justify-content: flex-end;
}

/* Error Messages */
.epf-error {
    background: #fff5f5;
    color: #e74c3c;
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid #fab1a0;
    margin: 16px 0;
    font-size: 14px;
}

.epf-success {
    background: #f0fff4;
    color: #27ae60;
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid #a7ffca;
    margin: 16px 0;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    #epf-product-form-container {
        padding: 16px;
    }
    
    .epf-price-row {
        flex-direction: column;
        gap: 16px;
    }
    
    .epf-category-condition-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .epf-action-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .epf-btn {
        min-width: auto;
    }
    
    .epf-delivery-grid {
        grid-template-columns: 1fr;
    }
    
    .epf-modal-content {
        margin: 10px;
        max-width: none;
    }
}

/* Login Notice */
.epf-login-notice {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #7f8c8d;
    font-size: 16px;
}

/* Multi Shipping Plugin Integration */
.epf-multi-shipping-section {
    padding: 24px;
}

.epf-shipping-description {
    margin-bottom: 20px;
}

.epf-shipping-description p {
    color: #5a6c7d;
    margin: 0;
    font-size: 14px;
}

.delivery-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.delivery-card {
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: #fff;
    position: relative;
}

.delivery-card:hover {
    border-color: #3498db;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
    transform: translateY(-2px);
}

.delivery-card.selected {
    border-color: #3498db;
    background-color: #f8f9fa;
    border-width: 2px;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.delivery-card .card-icon {
    flex-shrink: 0;
}

.delivery-card .card-icon i {
    font-size: 28px;
    color: #7f8c8d;
    transition: color 0.3s ease;
}

.delivery-card.selected .card-icon i,
.delivery-card:hover .card-icon i {
    color: #3498db;
}

.delivery-card .card-content {
    flex: 1;
}

.delivery-card .card-content h3 {
    margin: 0 0 5px;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.delivery-card .card-content p {
    margin: 0;
    font-size: 13px;
    color: #7f8c8d;
    line-height: 1.4;
}

/* Package Details Section */
.package-details-section,
.collection-location-section,
.delivery-zones-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

.package-details-section h4,
.collection-location-section h4,
.delivery-zones-section h4 {
    margin: 0 0 20px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.epf-package-label {
    font-weight: 600;
    color: #2c3e50;
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}

#dms_package_type {
    background: #fff;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%237f8c8d%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 12px center;
    appearance: none;
    padding-right: 40px;
}

#package_details_info {
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    padding: 20px;
    border-radius: 6px;
    margin-top: 15px;
}

.epf-package-dimensions {
    margin-bottom: 20px;
}

.epf-dimension-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.epf-field-quarter {
    width: 100%;
}

/* Collection Location Section */
.collection-location-section .epf-textarea {
    min-height: 80px;
    resize: vertical;
}

/* Delivery Zones Section */
.epf-delivery-zones {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.epf-zone-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    transition: border-color 0.3s ease;
}

.epf-zone-option:hover {
    border-color: #3498db;
}

.epf-zone-option .epf-checkbox-wrapper {
    flex: 1;
    margin: 0;
}

.epf-zone-label {
    display: flex;
    flex-direction: column;
    margin-left: 12px;
}

.epf-zone-label strong {
    color: #2c3e50;
    font-size: 14px;
    margin-bottom: 2px;
}

.epf-zone-label small {
    color: #7f8c8d;
    font-size: 12px;
}

.epf-zone-price {
    width: 120px;
    margin-left: 16px;
}

.epf-zone-price .epf-price-input {
    text-align: right;
}

/* Shipping Responsive Design */
@media (max-width: 768px) {
    .delivery-cards-container {
        grid-template-columns: 1fr;
    }
    
    .delivery-card {
        padding: 16px;
    }
    
    .delivery-card .card-icon i {
        font-size: 24px;
    }
    
    .epf-dimension-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .epf-zone-option {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .epf-zone-price {
        width: 100%;
        margin-left: 0;
    }
    
    .epf-zone-option .epf-checkbox-wrapper {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .epf-dimension-row {
        grid-template-columns: 1fr;
    }
}

/* eBay-Style Shipping Section */
.epf-ebay-shipping-section {
    padding: 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}

.epf-shipping-method-selection {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.epf-shipping-method-selection h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    font-family: system-ui, -apple-system, sans-serif;
}

.epf-shipping-method-options {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
    width: 100%;
}

.epf-shipping-method-option {
    cursor: pointer;
    margin: 0;
    display: block;
}

.epf-shipping-method-option input[type="radio"] {
    display: none;
}

.epf-method-card {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 12px;
    background: #fff;
    transition: all 0.2s ease;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-height: 70px;
    position: relative;
}

.epf-method-card:hover {
    border-color: #6b7280;
}

.epf-shipping-method-option input[type="radio"]:checked + .epf-method-card {
    border-color: #111827;
    border-width: 2px;
    background: #fff;
}

.epf-method-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.epf-method-icon i {
    font-size: 20px;
    color: #374151;
}

.epf-shipping-method-option input[type="radio"]:checked + .epf-method-card .epf-method-icon i {
    color: #111827;
}

.epf-method-info {
    flex: 1;
    min-width: 0;
}

.epf-method-info h5 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
    font-family: system-ui, -apple-system, sans-serif;
}

.epf-method-info p {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.3;
    font-family: system-ui, -apple-system, sans-serif;
}

/* Shipping Subsections */
.epf-shipping-subsection {
    border-top: 1px solid #e5e7eb;
}

.epf-shipping-instruction {
    padding: 16px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    margin: 16px;
}

.epf-shipping-instruction p {
    margin: 0;
    color: #0369a1;
    font-size: 14px;
    text-align: center;
}

.epf-shipping-subsection h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    font-family: system-ui, -apple-system, sans-serif;
    padding: 16px 16px 0 16px;
}

/* Package Details Section */
.epf-package-details-section {
    padding: 0;
}

.epf-package-class-selector {
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.epf-package-class-selector:hover {
    background: #f9fafb;
}

.epf-package-class-header {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.epf-package-class-info h6 {
    margin: 0 0 2px 0;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    font-family: system-ui, -apple-system, sans-serif;
}

.epf-package-class-info p {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
    font-family: system-ui, -apple-system, sans-serif;
}

.epf-package-class-arrow {
    color: #6b7280;
    font-size: 12px;
    transform: rotate(0deg);
    transition: transform 0.2s ease;
}

.epf-package-class-selector.expanded .epf-package-class-arrow {
    transform: rotate(180deg);
}

/* Postage Classes (eBay Style) */
.epf-postage-classes {
    padding: 16px;
    background: #fff;
    display: none;
    border-top: 1px solid #e0e0e0;
    margin-top: 8px;
    position: relative;
    z-index: 100;
}

.epf-package-class-selector.expanded .epf-postage-classes {
    display: block;
}

/* Ensure dropdown stays visible and clickable */
.epf-postage-classes select {
    position: relative;
    z-index: 101;
    pointer-events: auto;
    cursor: pointer;
}

/* Improve package class header clickability */
.epf-package-class-header {
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-radius: 4px;
    position: relative;
}

.epf-package-class-header:hover {
    background: #f0f0f0;
}

/* Make the arrow more visible */
.epf-package-class-arrow {
    color: #6b7280;
    font-size: 14px;
    transform: rotate(0deg);
    transition: transform 0.3s ease;
    padding: 4px;
}

.epf-package-class-selector.expanded .epf-package-class-arrow {
    transform: rotate(180deg);
}

/* Improve the overall package selector */
.epf-package-class-selector {
    border-bottom: 1px solid #e5e7eb;
    cursor: default; /* Only header should be clickable */
    transition: background-color 0.2s ease;
    position: relative;
}

.epf-package-class-selector:hover {
    background: #fafafa;
}

/* Prevent text selection on clickable elements */
.epf-package-class-header {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Improve dropdown styling */
.epf-shipping-class-select {
    min-height: 44px;
    font-size: 14px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    padding: 10px 40px 10px 12px;
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.epf-shipping-class-select:hover {
    border-color: #9ca3af;
}

.epf-shipping-class-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Select Shipping Group */
.epf-select-shipping-group {
    max-width: 100%;
}

/* Scheduling Styles */
.epf-schedule-options {
    margin-bottom: 24px;
}

.epf-schedule-option {
    margin-bottom: 16px;
}

.epf-radio-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
}

.epf-radio-label:hover {
    border-color: #3b82f6;
    background-color: #f8fafc;
}

.epf-radio-label input[type="radio"] {
    display: none;
}

.epf-radio-label input[type="radio"]:checked + .epf-radio-custom {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.epf-radio-label input[type="radio"]:checked + .epf-radio-custom::after {
    display: block;
}

.epf-radio-label input[type="radio"]:checked ~ .epf-option-content {
    color: #1e40af;
}

.epf-radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    margin-right: 12px;
    margin-top: 2px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s ease;
    background: white;
}

.epf-radio-custom::after {
    content: '';
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

.epf-option-content h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.epf-option-content p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.4;
}

.epf-schedule-datetime {
    padding: 20px;
    background-color: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 16px;
}

.epf-datetime-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.epf-schedule-info .epf-info-box {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    background-color: #dbeafe;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
}

.epf-schedule-info .epf-info-box i {
    color: #3b82f6;
    margin-right: 8px;
    margin-top: 2px;
    flex-shrink: 0;
}

.epf-schedule-info .epf-info-box p {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #1e40af;
    line-height: 1.4;
}

.epf-schedule-info .epf-info-box p:last-child {
    margin-bottom: 0;
}

.epf-schedule-preview {
    font-weight: 600;
    color: #059669 !important;
}

/* Responsive scheduling */
@media (max-width: 768px) {
    .epf-datetime-fields {
        grid-template-columns: 1fr;
    }
    
    .epf-radio-label {
        padding: 12px;
    }
    
    .epf-option-content h4 {
        font-size: 15px;
    }
    
    .epf-option-content p {
        font-size: 13px;
    }
    
    /* Improve input field sizing on mobile */
    .epf-price-row {
        flex-direction: column;
        gap: 16px;
    }
    
    .epf-price-row .epf-field-group {
        min-width: unset;
        width: 100%;
    }
    
    .epf-price-input {
        min-width: 140px;
    }
    
    .epf-number-input {
        min-width: 120px;
        max-width: 160px;
    }
}

.epf-shipping-class-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    margin-bottom: 8px;
    font-family: system-ui, -apple-system, sans-serif;
}

.epf-required {
    color: #dc2626;
    font-weight: 600;
}

.epf-shipping-class-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background-color: #fff;
    font-size: 14px;
    font-family: system-ui, -apple-system, sans-serif;
    color: #111827;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.epf-shipping-class-select:hover {
    border-color: #6b7280;
}

.epf-shipping-class-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.epf-shipping-class-select:disabled {
    background-color: #f9fafb;
    color: #6b7280;
    cursor: not-allowed;
}

.epf-shipping-help-text {
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.4;
}

.epf-no-shipping-classes {
    text-align: center;
    padding: 40px 20px;
    color: #e74c3c;
    background: #fff5f5;
    border: 1px solid #fab1a0;
    border-radius: 6px;
}

.epf-no-shipping-classes p {
    margin: 0;
    font-style: italic;
}

/* Location Fields */
.epf-location-fields {
    padding: 16px;
    background: #fff;
}

.epf-location-fields .epf-field-group {
    margin-bottom: 16px;
}

.epf-location-fields .epf-field-group:last-child {
    margin-bottom: 0;
}

.epf-google-autocomplete {
    background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23007cba"%3e%3cpath d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"/%3e%3c/svg%3e');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
}

/* Responsive Design for eBay Style */
/* Edit Product Button Styles */
.epf-product-edit-link {
    margin-top: 10px;
    text-align: center;
}

.epf-single-product-edit {
    margin: 15px 0;
}

.epf-edit-btn {
    background: #0073aa;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.epf-edit-btn:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
}

.epf-edit-btn:focus {
    outline: 2px solid #005a87;
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .epf-shipping-method-options {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .epf-method-card {
        padding: 12px;
        min-height: auto;
    }
    
    .epf-method-icon {
        width: 20px;
        height: 20px;
    }
    
    .epf-method-icon i {
        font-size: 16px;
    }
    
    .epf-postage-option-details {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .epf-postage-classes,
    .epf-location-fields {
        padding: 12px;
    }
    
    .epf-method-info h5 {
        font-size: 13px;
    }
    
    .epf-method-info p {
        font-size: 11px;
    }
    
    .epf-package-class-header {
        padding: 10px 12px;
    }
}
