/* Unified Product & Branding Configurator Styles */

.upb-section {
    margin-bottom: 30px;
}

.upb-section-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 15px;
    color: #2c3e50;
}

/* Color Selection */
.upb-color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.upb-color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upb-color-swatch:hover {
    transform: scale(1.1);
    border-color: #ddd;
}

.upb-color-swatch.selected {
    border-color: #2c3e50;
    transform: scale(1.1);
}

.upb-color-swatch img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.upb-color-swatch .color-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

/* Size Selection */
.upb-size-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.upb-size-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background: #f9f9f9;
}

.upb-size-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.upb-size-code {
    font-weight: 600;
    font-size: 14px;
    color: #2c3e50;
}

.upb-quantity-input {
    width: 80px; /* Increased from 60px to give space for buttons */
    padding: 8px 12px; /* Increased padding */
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 16px;
}

.upb-quantity-input::-webkit-inner-spin-button,
.upb-quantity-input::-webkit-outer-spin-button {
    -webkit-appearance: auto !important;
    opacity: 1 !important;
    display: inline-block !important;
    height: auto;
    margin: 0;
    cursor: pointer;
}



.upb-stock-info {
    font-size: 12px;
    color: #666;
}

.upb-stock-count {
    font-weight: 600;
    color: #27ae60;
}

/* Action Buttons */
.upb-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.upb-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 120px;
}

.upb-btn-outline {
    background: transparent;
    border: 2px solid #2c3e50;
    color: #2c3e50;
}

.upb-btn-outline:hover {
    background: #2c3e50;
    color: white;
}

.upb-btn-primary {
    background: #3498db;
    color: white;
    border: 2px solid #3498db;
}

.upb-btn-primary:hover {
    background: #2980b9;
    border-color: #2980b9;
}

.upb-btn-chat {
    background: #27ae60;
    color: white;
    border: 2px solid #27ae60;
}

.upb-btn-chat:hover {
    background: #219a52;
    border-color: #219a52;
}

.upb-btn-secondary {
    background: #95a5a6;
    color: white;
    border: 2px solid #95a5a6;
}

.upb-btn-secondary:hover {
    background: #7f8c8d;
    border-color: #7f8c8d;
}

/* Modal Styles */
.upb-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.upb-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.upb-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.upb-modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    letter-spacing: 1px;
}

.upb-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upb-modal-close:hover {
    color: #000;
}

.upb-modal-body {
    padding: 30px;
}

.upb-product-title h3 {
    text-align: center;
    margin: 0 0 30px 0;
    font-size: 20px;
    color: #2c3e50;
}

/* Step Navigation */
.upb-step-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.upb-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #3498db;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
}

.upb-step-number.upb-completed {
    background: #27ae60;
}

.upb-step-number.upb-inactive {
    background: #bdc3c7;
}

.upb-step-divider {
    width: 100px;
    height: 2px;
    background: #bdc3c7;
    margin: 0 20px;
}

.upb-step-title {
    text-align: center;
    font-size: 18px;
    color: #3498db;
    margin-bottom: 30px;
}

/* Position Selection */
.upb-positions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.upb-position-option {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.upb-position-option:hover {
    border-color: #3498db;
    background: #f8f9fa;
}

.upb-position-option input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.upb-position-option input[type="checkbox"]:checked + span {
    color: #3498db;
    font-weight: 600;
}

.upb-branding-guides {
    text-align: center;
    margin-bottom: 30px;
}

.upb-branding-guides a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.upb-branding-guides a:hover {
    text-decoration: underline;
}

/* Step Actions */
.upb-step-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Branding Setup */
.upb-position-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #f9f9f9;
}

.upb-position-header h5 {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #2c3e50;
    font-weight: 600;
}

.upb-method-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 15px;
}

.upb-artwork-section {
    border-top: 1px solid #e0e0e0;
    padding-top: 15px;
}

.upb-artwork-note {
    font-size: 12px;
    color: #666;
    margin-bottom: 15px;
    padding: 10px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
}

.upb-artwork-upload-area {
    text-align: center;
}

.upb-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.upb-upload-btn:hover {
    background: #2980b9;
}

.upb-upload-icon {
    font-size: 18px;
    font-weight: bold;
}

.upb-uploaded-file {
    margin-top: 15px;
    padding: 10px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
}

.upb-file-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.upb-file-name {
    font-size: 14px;
    color: #155724;
}

.upb-remove-file {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.upb-remove-file:hover {
    background: #c82333;
}

/* Success Message */
.upb-success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 15px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .upb-modal {
        padding: 10px;
    }
    
    .upb-modal-content {
        max-height: 95vh;
    }
    
    .upb-modal-body {
        padding: 20px;
    }
    
    .upb-actions {
        flex-direction: column;
    }
    
    .upb-btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .upb-size-grid {
        grid-template-columns: 1fr;
    }
    
    .upb-positions {
        grid-template-columns: 1fr;
    }
    
    .upb-step-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .upb-step-header {
        margin-bottom: 20px;
    }
    
    .upb-step-divider {
        width: 60px;
        margin: 0 10px;
    }
}

/* Loading States */
.upb-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Hide default WooCommerce elements when our form is active */
body.single-product .single_add_to_cart_button,
body.single-product .variations_form {
    display: none !important;
}

/* Method Details */
.upb-method-details {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.upb-pricing-display {
    color: #495057;
    line-height: 1.4;
}

.upb-pricing-display strong {
    color: #2c3e50;
}

/* Artwork Section */

/* Unified Product & Branding Configurator Styles */

.upb-section {
    margin-bottom: 30px;
}

.upb-section-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 15px;
    color: #2c3e50;
}

/* Color Selection - Updated for text labels */
.upb-color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
}

.upb-color-swatch {
    min-width: 100px;
    padding: 10px 18px;
    border-radius: 25px;
    cursor: pointer;
    border: 2px solid #ddd;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 13px;
    text-transform: capitalize;
    background: #ffffff;
    color: #333;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.upb-color-swatch:hover {
    transform: translateY(-1px);
    border-color: #3498db;
    box-shadow: 0 3px 8px rgba(52, 152, 219, 0.2);
    background: #f8fbff;
}

.upb-color-swatch.selected {
    border-color: #3498db;
    background: #3498db;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
    font-weight: 600;
}

/* Hide images if they exist */
.upb-color-swatch img {
    display: none !important;
}

.upb-color-swatch .color-circle {
    display: none !important;
}

/* Size Selection */
.upb-size-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.upb-size-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

.upb-size-item.upb-out-of-stock {
    background: #f5f5f5;
    opacity: 0.6;
    border-color: #ddd;
}

.upb-size-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.upb-size-code {
    font-weight: 600;
    font-size: 14px;
    color: #2c3e50;
}

.upb-size-item.upb-out-of-stock .upb-size-code {
    color: #999;
}

.upb-quantity-input {
    width: 60px;
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 16px;
}

.upb-quantity-input:disabled {
    background: #e9ecef;
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
}

.upb-stock-info {
    font-size: 12px;
    color: #666;
}

.upb-stock-count {
    font-weight: 600;
    color: #27ae60;
}

.upb-stock-count.upb-no-stock {
    color: #dc3545;
}

/* Action Buttons */
.upb-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.upb-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 120px;
}

.upb-btn-outline {
    background: transparent;
    border: 2px solid #2c3e50;
    color: #2c3e50;
}

.upb-btn-outline:hover {
    background: #2c3e50;
    color: white;
}

.upb-btn-primary {
    background: #3498db;
    color: white;
    border: 2px solid #3498db;
}

.upb-btn-primary:hover {
    background: #2980b9;
    border-color: #2980b9;
}

.upb-btn-chat {
    background: #27ae60;
    color: white;
    border: 2px solid #27ae60;
}

.upb-btn-chat:hover {
    background: #219a52;
    border-color: #219a52;
}

.upb-btn-secondary {
    background: #95a5a6;
    color: white;
    border: 2px solid #95a5a6;
}

.upb-btn-secondary:hover {
    background: #7f8c8d;
    border-color: #7f8c8d;
}

/* Modal Styles */
.upb-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.upb-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.upb-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.upb-modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    letter-spacing: 1px;
}

.upb-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upb-modal-close:hover {
    color: #000;
}

.upb-modal-body {
    padding: 30px;
}

.upb-product-title h3 {
    text-align: center;
    margin: 0 0 30px 0;
    font-size: 20px;
    color: #2c3e50;
}

/* Step Navigation */
.upb-step-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.upb-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #3498db;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
}

.upb-step-number.upb-completed {
    background: #27ae60;
}

.upb-step-number.upb-inactive {
    background: #bdc3c7;
}

.upb-step-divider {
    width: 100px;
    height: 2px;
    background: #bdc3c7;
    margin: 0 20px;
}

.upb-step-title {
    text-align: center;
    font-size: 18px;
    color: #3498db;
    margin-bottom: 30px;
}

/* Position Selection */
.upb-positions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.upb-position-option {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.upb-position-option:hover {
    border-color: #3498db;
    background: #f8f9fa;
}

.upb-position-option input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.upb-position-option input[type="checkbox"]:checked + span {
    color: #3498db;
    font-weight: 600;
}

.upb-branding-guides {
    text-align: center;
    margin-bottom: 30px;
}

.upb-branding-guides a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.upb-branding-guides a:hover {
    text-decoration: underline;
}

/* Step Actions */
.upb-step-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Branding Setup */
.upb-position-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #f9f9f9;
}

.upb-position-header h5 {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #2c3e50;
    font-weight: 600;
}

.upb-method-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 15px;
}

.upb-artwork-section {
    border-top: 1px solid #e0e0e0;
    padding-top: 15px;
}

.upb-artwork-note {
    font-size: 12px;
    color: #666;
    margin-bottom: 15px;
    padding: 10px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
}

.upb-artwork-upload-area {
    text-align: center;
}

.upb-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.upb-upload-btn:hover {
    background: #2980b9;
}

.upb-upload-icon {
    font-size: 18px;
    font-weight: bold;
}

.upb-uploaded-file {
    margin-top: 15px;
    padding: 10px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
}

.upb-file-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.upb-file-name {
    font-size: 14px;
    color: #155724;
}

.upb-remove-file {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.upb-remove-file:hover {
    background: #c82333;
}

/* Success Message */
.upb-success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 15px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .upb-modal {
        padding: 10px;
    }
    
    .upb-modal-content {
        max-height: 95vh;
    }
    
    .upb-modal-body {
        padding: 20px;
    }
    
    .upb-actions {
        flex-direction: column;
    }
    
    .upb-btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .upb-size-grid {
        grid-template-columns: 1fr;
    }
    
    .upb-positions {
        grid-template-columns: 1fr;
    }
    
    .upb-step-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .upb-step-header {
        margin-bottom: 20px;
    }
    
    .upb-step-divider {
        width: 60px;
        margin: 0 10px;
    }
}

/* Loading States */
.upb-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Hide default WooCommerce elements when our form is active */
body.single-product .single_add_to_cart_button,
body.single-product .variations_form {
    display: none !important;
}

/* Method Details */
.upb-method-details {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.upb-pricing-display {
    color: #495057;
    line-height: 1.4;
}

.upb-pricing-display strong {
    color: #2c3e50;
}

/* Artwork Section */
.upb-tier-table {
  background: #f8f9fa;
  padding: 8px 10px;
  border-radius: 6px;
  margin-top: 6px;
  line-height: 1.4em;
}
.upb-tier-table strong {
  display: block;
  margin-bottom: 4px;
  color: #333;
}

