/* Fable Foundry 3D Printing Orders - Base Structure Only */
/* All styling is controlled through Elementor widget controls */

.ff-order-form-wrapper {
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.ff-printing-order-form {
    width: 100%;
    box-sizing: border-box;
}

/* Form Section Structure */
.ff-form-section {
    margin-bottom: 0.75rem;
}

.ff-form-section h2 {
    margin-bottom: 0.6rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid;
    font-size: 15px;
}

/* Form Layout */
.ff-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.ff-form-group {
    margin-bottom: 0.5rem;
}

.ff-form-group:last-child {
    margin-bottom: 0;
}

.ff-form-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 13px;
}

.ff-form-group input,
.ff-form-group select,
.ff-form-group textarea {
    width: 100%;
    box-sizing: border-box;
    transition: all 0.2s ease;
    padding: 7px 10px !important;
    font-size: 13px !important;
}

.ff-form-group input:focus,
.ff-form-group select:focus,
.ff-form-group textarea:focus {
    outline: none;
}

.ff-form-group textarea {
    resize: vertical;
    min-height: 70px;
}

/* Print Type Toggle Structure */
.ff-print-type-toggle {
    display: flex;
    justify-content: center;
    gap: 20vw;
    margin: 0 auto;
}

.ff-print-type-option {
    cursor: pointer;
    margin: 0;
    display: block;
    width: 220px;
    flex-shrink: 0;
    position: relative;
}

.ff-print-type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.ff-option-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px 14px 12px;
    box-sizing: border-box;
    transition: all 0.2s ease;
    background: #0f2e30 !important;
    border: 2px solid #2a5a5f;
    border-radius: 8px;
    gap: 10px;
}

.ff-option-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border-radius: 4px;
    overflow: visible;
}

.ff-option-icon svg,
.ff-option-icon img {
    width: 100%;
    height: auto;
    max-height: 130px;
    object-fit: contain;
    display: block;
    border-radius: 4px;
}

.ff-option-text {
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    width: 100%;
    color: #5ef5a7;
}

.ff-option-desc {
    font-size: 11px;
    font-weight: 400;
    text-align: center;
    width: 100%;
    color: rgba(232, 245, 240, 0.6);
    line-height: 1.4;
    margin-top: 4px;
    padding: 0 4px;
}

/* Hover */
.ff-print-type-option:hover .ff-option-label {
    border-color: #5ef5a7;
    background: #143d40 !important;
    box-shadow: 0 2px 8px rgba(94, 245, 167, 0.2);
    transform: translateY(-1px);
}

/* Checked */
.ff-print-type-option input[type="radio"]:checked + .ff-option-label {
    border-color: #5ef5a7;
    background: #1a5060 !important;
    box-shadow: 0 2px 10px rgba(94, 245, 167, 0.3);
}

/* Checkmark badge */
.ff-print-type-option input[type="radio"]:checked + .ff-option-label::before {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 5px;
    width: 16px;
    height: 16px;
    background: #5ef5a7;
    color: #0d3b3f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 10px;
}

/* Submit Button */
.ff-form-actions {
    text-align: center;
    margin-top: 1rem;
}

.ff-submit-btn {
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
}

.ff-submit-btn:hover {
    transform: translateY(-2px);
}

/* Messages */
.ff-order-message {
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    border-radius: 8px;
    line-height: 1.5;
    font-size: 0.95rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.ff-message-icon {
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
    flex-shrink: 0;
}

.ff-message-content {
    flex: 1;
}

.ff-order-message strong {
    font-weight: 600;
}

.ff-order-message p {
    margin: 0.4rem 0;
}

.ff-order-message.ff-success {
    background: linear-gradient(135deg, #0d3b3f 0%, #1a5f66 100%) !important;
    color: #ffffff !important;
    border: 2px solid #5ef5a7 !important;
    box-shadow: 0 4px 20px rgba(94, 245, 167, 0.25) !important;
    padding: 1.5rem !important;
}

.ff-order-message.ff-success .ff-message-icon {
    color: #5ef5a7 !important;
}

.ff-order-message.ff-success strong {
    color: #5ef5a7 !important;
}

.ff-order-message.ff-success p {
    color: #e8f5f0 !important;
    margin: 0.75rem 0;
}

.ff-order-message.ff-success div {
    background: rgba(255, 255, 255, 0.1) !important;
    padding: 1rem !important;
    border-radius: 6px;
    margin: 0.75rem 0;
    border: 1px solid rgba(94, 245, 167, 0.3);
}

.ff-order-message.ff-success div strong {
    color: #5ef5a7 !important;
}

/* ── File upload list items ── */
/* ── File upload section ────────────────────────────────────────────────────── */
.ff-field-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #5ef5a7;
}

.ff-custom-file-input {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ff-add-files-btn,
button#ff-add-file-btn {
    background: linear-gradient(135deg, #0d3b3f 0%, #1a5f66 100%) !important;
    color: #5ef5a7 !important;
    border: 1px solid rgba(94, 245, 167, 0.4) !important;
    padding: 9px 20px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    transition: all 0.2s !important;
    display: inline-block !important;
    box-shadow: none !important;
    text-shadow: none !important;
}
.ff-add-files-btn:hover,
button#ff-add-file-btn:hover {
    border-color: rgba(94, 245, 167, 0.8) !important;
    background: linear-gradient(135deg, #0f4449 0%, #1e6e77 100%) !important;
    color: #5ef5a7 !important;
    box-shadow: none !important;
}

.ff-file-count {
    color: #5ef5a7;
    font-weight: 600;
    font-size: 13px;
}

.ff-files-header {
    display: block;
    margin-bottom: 8px;
    color: rgba(94, 245, 167, 0.6);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 600;
}

#file-list-with-quantities .ff-file-item,
.ff-file-item.elementor-file-item,
.ff-file-item {
    background: rgba(13, 59, 63, 0.7) !important;
    border: 1px solid rgba(94, 245, 167, 0.25) !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    margin-bottom: 6px !important;
    transition: border-color 0.2s ease;
}

#file-list-with-quantities .ff-file-item:hover,
.ff-file-item.elementor-file-item:hover {
    border-color: rgba(94, 245, 167, 0.6) !important;
    box-shadow: none !important;
}

.ff-file-content {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 12px !important;
}

.ff-file-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ff-file-upload-section {
    width: 72%;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .ff-file-upload-section {
        width: 100%;
    }
}

.ff-file-name {
    color: #5ef5a7 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.ff-file-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ff-file-size {
    color: rgba(94, 245, 167, 0.5) !important;
    font-size: 11px !important;
}

.ff-quantity-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-shrink: 0;
}

.ff-quantity-label {
    color: rgba(94, 245, 167, 0.6) !important;
    font-weight: 600 !important;
    font-size: 10px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin: 0 0 2px 0 !important;
    padding: 0 !important;
}

.ff-quantity-input {
    width: 52px !important;
    padding: 5px 6px !important;
    border: 1px solid rgba(94, 245, 167, 0.35) !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-align: center !important;
    background: rgba(13, 59, 63, 0.9) !important;
    color: #5ef5a7 !important;
    transition: border-color 0.2s ease;
}

.ff-quantity-input:focus {
    outline: none !important;
    border-color: #5ef5a7 !important;
    box-shadow: 0 0 0 2px rgba(94, 245, 167, 0.15) !important;
}

.ff-remove-file {
    background: transparent !important;
    color: rgba(94, 245, 167, 0.4) !important;
    border: 1px solid rgba(94, 245, 167, 0.15) !important;
    padding: 5px 10px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ff-remove-file:hover {
    background: rgba(94, 245, 167, 0.07) !important;
    border-color: rgba(94, 245, 167, 0.4) !important;
    color: #5ef5a7 !important;
}

/* ── Card Selectors ── */
.ff-card-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 6px;
}

.ff-card-selector.ff-compact-cards {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 5px;
}

.ff-card-option {
    cursor: pointer;
    margin: 0;
    display: block;
    position: relative;
}

.ff-card-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ff-card-content {
    padding: 8px 10px;
    border-radius: 6px;
    border: 1.5px solid #2a5a5f;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: #0f2e30;
    min-height: 52px;
}

.ff-card-option.ff-compact .ff-card-content {
    padding: 6px 8px;
    min-height: 38px;
}

.ff-card-option:hover .ff-card-content {
    border-color: #5ef5a7;
    background: #143d40;
    box-shadow: 0 2px 6px rgba(94, 245, 167, 0.15);
    transform: translateY(-1px);
}

.ff-card-option input[type="radio"]:checked + .ff-card-content {
    border-color: #5ef5a7;
    background: #1a5060;
    box-shadow: 0 2px 8px rgba(94, 245, 167, 0.25);
}

.ff-card-option input[type="radio"]:checked + .ff-card-content::before {
    content: '✓';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 15px;
    height: 15px;
    background: #5ef5a7;
    color: #0d3b3f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 9px;
}

.ff-card-title {
    font-size: 12px;
    font-weight: 600;
    color: #e8f5e9;
    display: block;
    line-height: 1.3;
}

.ff-card-option.ff-compact .ff-card-title {
    font-size: 11px;
    font-weight: 600;
    color: #e8f5e9;
}

/* ── Colour swatch picker ── */
.ff-color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.ff-swatch-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    position: relative;
}

.ff-swatch-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ff-swatch-dot {
    display: block;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    box-sizing: border-box;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.ff-swatch-label {
    font-size: 10px;
    color: rgba(255,255,255,0.6);
    text-align: center;
    max-width: 52px;
    line-height: 1.2;
    transition: color 0.15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ff-swatch-option:hover .ff-swatch-dot {
    transform: scale(1.12);
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.ff-swatch-option:hover .ff-swatch-label {
    color: rgba(255,255,255,0.9);
}

.ff-swatch-option input[type="radio"]:checked ~ .ff-swatch-dot {
    transform: scale(1.15);
    box-shadow: 0 0 0 3px #5ef5a7, 0 2px 8px rgba(0,0,0,0.5);
}

.ff-swatch-option input[type="radio"]:checked ~ .ff-swatch-label {
    color: #5ef5a7;
    font-weight: 700;
}

@media (max-width: 480px) {
    .ff-swatch-dot { width: 30px; height: 30px; }
    .ff-swatch-label { font-size: 9px; max-width: 40px; }
}

.ff-card-desc {
    font-size: 10px;
    color: #8fbcb0;
    line-height: 1.2;
    display: block;
    margin-top: 2px;
}

.ff-full-width {
    grid-column: 1 / -1;
}

/* Make cards Elementor-styleable */
.elementor-card-selector .ff-card-content { }
.elementor-card-title { }
.elementor-card-desc { }

/* Mobile responsive for cards */
@media (max-width: 768px) {
    .ff-card-selector {
        grid-template-columns: repeat(2, 1fr);
    }
    .ff-card-selector.ff-compact-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}
#file-list-with-quantities {
    margin-top: 12px;
}

#file-list-with-quantities > strong {
    color: #5ef5a7;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 8px;
}

.ff-order-message.ff-warning {
    background: linear-gradient(135deg, #3b2d0d 0%, #5f4a1a 100%);
    color: #ffffff;
    border: 2px solid #f5c95e;
    box-shadow: 0 4px 20px rgba(245, 201, 94, 0.25);
}

.ff-order-message.ff-warning .ff-message-icon {
    color: #f5c95e;
}

.ff-order-message.ff-warning strong {
    color: #f5c95e;
}

.ff-order-message.ff-error {
    background: linear-gradient(135deg, #3b0d0d 0%, #5f1a1a 100%);
    color: #ffffff;
    border: 2px solid #f55e5e;
    box-shadow: 0 4px 20px rgba(245, 94, 94, 0.25);
}

.ff-order-message.ff-error .ff-message-icon {
    color: #f55e5e;
}

.ff-order-message.ff-error strong {
    color: #f55e5e;
}

/* Mobile message layout */
@media (max-width: 768px) {
    .ff-order-message {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }
    
    .ff-message-icon {
        font-size: 3rem;
    }
}

.ff-field-hint {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #666; /* Fallback - can be overridden by Elementor */
}

/* Elementor-specific hint text styling */
.elementor-field-hint {
    /* Elementor can override all properties */
}

/* File Quantity Items - Elementor Styleable */

/* Elementor override classes - highest priority */
.elementor-file-item {
    /* Elementor can override all properties */
}

.elementor-quantity-wrapper .elementor-field {
    /* Elementor can override quantity input */
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .ff-form-row,
    .ff-print-type-toggle {
        grid-template-columns: 1fr;
    }
    
    .ff-submit-btn {
        width: 100%;
    }
}

/* ── Print type + specs: connected visual group ── */
.ff-print-type-section {
    margin-bottom: 0 !important;
    padding-bottom: 0.5rem;
    border-bottom: none !important;
}

.ff-print-type-section h2 {
    border-bottom: 2px solid;
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
}

.ff-fdm-fields,
.ff-resin-fields {
    display: none !important;
    border-top: 2px solid rgba(94,245,167,0.3);
    margin-top: 0 !important;
    padding-top: 0.75rem;
}

/* Only show when explicitly set to block by JavaScript */
.ff-fdm-fields[style*="display: block"],
.ff-resin-fields[style*="display: block"] {
    display: block !important;
}

.ff-fdm-fields h2,
.ff-resin-fields h2 {
    margin-top: 0;
    padding-top: 0;
}

/* Card-Style Selectors */
.ff-card-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

/* Compact cards for simple options (layer height, infill, color, etc) */
.ff-card-selector.ff-compact-cards {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 6px;
}

.ff-card-option {
    position: relative;
    cursor: pointer;
    display: block;
    height: 100%;
}

.ff-card-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.ff-card-content {
    border: 2px solid #2a5a5f;
    border-radius: 6px;
    padding: 10px 12px;
    background: #0f2e30;
    transition: all 0.3s ease;
    min-height: 50px;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 3px;
    box-sizing: border-box;
}

/* Compact card content */
.ff-card-option.ff-compact .ff-card-content {
    min-height: 38px;
    padding: 8px 10px;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: #0f2e30;
}

.ff-card-option:hover .ff-card-content {
    border-color: #5ef5a7;
    background: #143d40;
    box-shadow: 0 2px 8px rgba(94, 245, 167, 0.2);
    transform: translateY(-1px);
}

.ff-card-option input[type="radio"]:checked + .ff-card-content {
    border-color: #5ef5a7;
    background: #1a5060;
    box-shadow: 0 2px 10px rgba(94, 245, 167, 0.3);
}

.ff-card-option input[type="radio"]:checked + .ff-card-content::before {
    content: '✓';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    background: #5ef5a7;
    color: #0d3b3f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 11px;
}

.ff-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #e8f5e9;
    display: block;
}

/* Compact card title */
.ff-card-option.ff-compact .ff-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #e8f5e9;
}

.ff-card-desc {
    font-size: 11px;
    color: #8fbcb0;
    line-height: 1.3;
    display: block;
}

.ff-full-width {
    grid-column: 1 / -1;
}

/* Make cards Elementor-styleable */
.elementor-card-selector .ff-card-content {
    /* Can be overridden by Elementor */
}

.elementor-card-title {
    /* Can be overridden by Elementor */
}

.elementor-card-desc {
    /* Can be overridden by Elementor */
}

/* Mobile responsive for cards */
@media (max-width: 768px) {
    .ff-card-selector {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ff-card-selector.ff-compact-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Email CTA Button - Mint Green Text */
.cta-button,
a.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, #0d3b3f 0%, #1a5f66 100%);
    color: #5ef5a7 !important; /* Fable mint green */
    padding: 16px 40px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    margin: 20px 0;
    border: 2px solid #5ef5a7;
    transition: all 0.3s ease;
}

.cta-button:hover,
a.cta-button:hover {
    background: #5ef5a7;
    color: #0d3b3f !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(94, 245, 167, 0.4);
}

/* WooCommerce Thank You / Order Received Page Styling - BULLETPROOF */
/* Strengthened with !important and multiple selectors for cross-browser consistency */

/* Thank you message - multiple selectors for maximum compatibility */
.woocommerce-order-received .woocommerce-notice,
.woocommerce-thankyou-order-received,
.woocommerce-order-received .woocommerce-notice--success,
.woocommerce-order-received .woocommerce-message {
    background: linear-gradient(135deg, #0d3b3f 0%, #1a5f66 100%) !important;
    color: #ffffff !important;
    border: 2px solid #5ef5a7 !important;
    padding: 2rem !important;
    border-radius: 8px !important;
    margin: 2rem 0 !important;
    box-shadow: 0 4px 20px rgba(94, 245, 167, 0.25) !important;
}

/* Force white text in success messages */
.woocommerce-order-received .woocommerce-notice *,
.woocommerce-thankyou-order-received * {
    color: #ffffff !important;
}

/* Order overview grid - ORDER NUMBER / DATE / TOTAL / PAYMENT */
.woocommerce-order-received .woocommerce-order-overview,
ul.woocommerce-order-overview {
    background: rgba(13, 59, 63, 0.7) !important;
    border: 2px solid #5ef5a7 !important;
    padding: 1.5rem !important;
    border-radius: 8px !important;
    margin: 1.5rem 0 !important;
    list-style: none !important;
}

/* Order overview items */
.woocommerce-order-received .woocommerce-order-overview li,
ul.woocommerce-order-overview li {
    color: #e8f5f0 !important;
    border-bottom: 1px solid rgba(94, 245, 167, 0.2) !important;
    padding: 0.75rem 0 !important;
    background: transparent !important;
}

/* Order overview labels (strong tags) */
.woocommerce-order-received .woocommerce-order-overview li strong,
ul.woocommerce-order-overview li strong,
.woocommerce-order-received .woocommerce-order-overview strong {
    color: #5ef5a7 !important;
    font-weight: 600 !important;
    display: block !important;
    margin-bottom: 5px !important;
}

/* Order overview values */
.woocommerce-order-received .woocommerce-order-overview .amount,
ul.woocommerce-order-overview .amount {
    color: #5ef5a7 !important;
    font-weight: 700 !important;
    font-size: 1.2em !important;
}

/* ── Order details table — order-received AND my-account order view ── */
.woocommerce-order-received .woocommerce-table,
.woocommerce-order-received table.woocommerce-table,
.woocommerce-order-details .woocommerce-table,
.woocommerce-MyAccount-content .woocommerce-table,
.woocommerce-MyAccount-content table.woocommerce-table,
.woocommerce-MyAccount-content .woocommerce-table--order-details {
    background: #0d2c2e !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    border: 2px solid rgba(94, 245, 167, 0.4) !important;
    margin: 1.5rem 0 !important;
}

/* Table headers */
.woocommerce-order-received .woocommerce-table thead,
.woocommerce-order-received table thead,
.woocommerce-MyAccount-content .woocommerce-table thead,
.woocommerce-MyAccount-content table thead {
    background: #0f3538 !important;
}

.woocommerce-order-received .woocommerce-table thead th,
.woocommerce-order-received table thead th,
.woocommerce-MyAccount-content .woocommerce-table thead th,
.woocommerce-MyAccount-content table thead th {
    background: #0f3538 !important;
    color: #5ef5a7 !important;
    border-color: rgba(94, 245, 167, 0.25) !important;
    padding: 1rem !important;
}

/* Table body cells */
.woocommerce-order-received .woocommerce-table tbody td,
.woocommerce-order-received table tbody td,
.woocommerce-MyAccount-content .woocommerce-table tbody td,
.woocommerce-MyAccount-content table tbody td {
    background: #0d2c2e !important;
    color: #e8f5f0 !important;
    padding: 1rem !important;
    border-color: rgba(94, 245, 167, 0.1) !important;
}

/* Alternating rows */
.woocommerce-order-received .woocommerce-table tbody tr:nth-child(even) td,
.woocommerce-MyAccount-content .woocommerce-table tbody tr:nth-child(even) td {
    background: #0f3538 !important;
}

/* Table footer (totals) */
.woocommerce-order-received .woocommerce-table tfoot,
.woocommerce-order-received table tfoot,
.woocommerce-MyAccount-content .woocommerce-table tfoot,
.woocommerce-MyAccount-content table tfoot {
    background: #091f22 !important;
}

.woocommerce-order-received .woocommerce-table tfoot th,
.woocommerce-order-received .woocommerce-table tfoot td,
.woocommerce-order-received table tfoot th,
.woocommerce-order-received table tfoot td,
.woocommerce-MyAccount-content .woocommerce-table tfoot th,
.woocommerce-MyAccount-content .woocommerce-table tfoot td,
.woocommerce-MyAccount-content table tfoot th,
.woocommerce-MyAccount-content table tfoot td {
    background: #091f22 !important;
    color: #e8f5f0 !important;
    border-color: rgba(94, 245, 167, 0.2) !important;
    padding: 1rem !important;
}

/* Prices */
.woocommerce-order-received .woocommerce-table .woocommerce-Price-amount,
.woocommerce-MyAccount-content .woocommerce-table .woocommerce-Price-amount {
    color: #5ef5a7 !important;
    font-weight: 700 !important;
}

/* Strikethrough / cancelled prices */
.woocommerce-MyAccount-content .woocommerce-table del,
.woocommerce-order-received .woocommerce-table del {
    color: rgba(232, 245, 240, 0.35) !important;
}

/* Product links in table */
.woocommerce-MyAccount-content .woocommerce-table td a,
.woocommerce-order-received .woocommerce-table td a {
    color: #5ef5a7 !important;
}
.woocommerce-MyAccount-content .woocommerce-table td a:hover,
.woocommerce-order-received .woocommerce-table td a:hover {
    color: #4de096 !important;
}

/* Section headings */
.woocommerce-order-received h2,
.woocommerce-order-received h3,
.woocommerce-order-received .woocommerce-order-details__title,
.woocommerce-order-received .woocommerce-column__title,
.woocommerce-MyAccount-content h2,
.woocommerce-MyAccount-content .woocommerce-order-details__title,
.woocommerce-MyAccount-content .woocommerce-column__title {
    color: #5ef5a7 !important;
    background: transparent !important;
    padding: 0.25rem 0 !important;
    border-radius: 0 !important;
    border: none !important;
    border-bottom: 1px solid rgba(94, 245, 167, 0.25) !important;
    margin: 1.5rem 0 0.75rem 0 !important;
}

/* Customer details / address column wrappers */
.woocommerce-order-received .woocommerce-customer-details,
.woocommerce-order-received .woocommerce-columns,
.woocommerce-MyAccount-content .woocommerce-customer-details,
.woocommerce-MyAccount-content .woocommerce-columns {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin-bottom: 1.5rem !important;
}

/* Address blocks */
.woocommerce-order-received address,
.woocommerce-order-received .woocommerce-customer-details address,
.woocommerce-MyAccount-content address,
.woocommerce-MyAccount-content .woocommerce-customer-details address {
    background: #0f3538 !important;
    color: #e8f5f0 !important;
    padding: 1.25rem !important;
    border-radius: 8px !important;
    border: 1px solid rgba(94, 245, 167, 0.2) !important;
    font-style: normal !important;
    line-height: 1.8 !important;
}

/* Fix theme overrides */
.woocommerce-order-received .entry-content,
.woocommerce-MyAccount-content .entry-content {
    background: transparent !important;
}

/* Order Details wrapper */
.woocommerce-order-details {
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    margin: 1.5rem 0 !important;
    border: none !important;
}

.woocommerce-table--order-details {
    border: none !important;
}

.woocommerce-table--order-details th {
    background: #0f3538 !important;
    color: #5ef5a7 !important;
    padding: 15px !important;
}

.woocommerce-table--order-details td {
    background: #0d2c2e !important;
    color: #e8f5f0 !important;
    padding: 15px !important;
    border-bottom: 1px solid rgba(94, 245, 167, 0.1) !important;
}

.woocommerce-Price-amount {
    color: #5ef5a7 !important;
    font-weight: bold !important;
}

/* ── Order item left-column text — name, colour, any variation attribute ──
   WooCommerce order table meta HTML structure:
   <ul class="wc-item-meta">
     <li>
       <strong class="wc-item-meta-label">Colour:</strong>
       <p>Grey</p>
     </li>
   </ul>
── */
.woocommerce-MyAccount-content .woocommerce-table td,
.woocommerce-MyAccount-content .woocommerce-table td a,
.woocommerce-MyAccount-content .woocommerce-table td ul.wc-item-meta,
.woocommerce-MyAccount-content .woocommerce-table td ul.wc-item-meta li,
.woocommerce-MyAccount-content .woocommerce-table td ul.wc-item-meta li strong,
.woocommerce-MyAccount-content .woocommerce-table td ul.wc-item-meta li .wc-item-meta-label,
.woocommerce-MyAccount-content .woocommerce-table td ul.wc-item-meta li p,
.woocommerce-MyAccount-content .woocommerce-table td dl,
.woocommerce-MyAccount-content .woocommerce-table td dl dt,
.woocommerce-MyAccount-content .woocommerce-table td dl dt strong,
.woocommerce-MyAccount-content .woocommerce-table td dl dd,
.woocommerce-MyAccount-content .woocommerce-table td dl p,
.woocommerce-order-received .woocommerce-table td,
.woocommerce-order-received .woocommerce-table td a,
.woocommerce-order-received .woocommerce-table td ul.wc-item-meta,
.woocommerce-order-received .woocommerce-table td ul.wc-item-meta li,
.woocommerce-order-received .woocommerce-table td ul.wc-item-meta li strong,
.woocommerce-order-received .woocommerce-table td ul.wc-item-meta li .wc-item-meta-label,
.woocommerce-order-received .woocommerce-table td ul.wc-item-meta li p,
.woocommerce-order-received .woocommerce-table td dl,
.woocommerce-order-received .woocommerce-table td dl dt,
.woocommerce-order-received .woocommerce-table td dl dt strong,
.woocommerce-order-received .woocommerce-table td dl dd,
.woocommerce-order-received .woocommerce-table td dl p {
    color: #e8f5f0 !important;
    opacity: 1 !important;
}

/* Keep prices accent green even within a now-white td */
.woocommerce-MyAccount-content .woocommerce-table td .woocommerce-Price-amount,
.woocommerce-order-received .woocommerce-table td .woocommerce-Price-amount {
    color: #5ef5a7 !important;
}

/* ── Two-column Details + Address grid ──────────────── */
.ff-details-address-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 0.5rem;
}

@media (min-width: 860px) {
    .ff-details-address-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        align-items: start;
    }
    /* Both columns sit flush at top, no extra bottom margin between them */
    .ff-details-address-grid .ff-form-section {
        margin-bottom: 0;
    }
}

/* Upload Progress Bar Styling */
progress {
    width: 100%;
    height: 30px;
    border: none;
    border-radius: 15px;
    background: #0d3b3f;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

progress::-webkit-progress-bar {
    background: #0d3b3f;
    border-radius: 15px;
}

progress::-webkit-progress-value {
    background: linear-gradient(90deg, #5ef5a7 0%, #4caf50 100%);
    border-radius: 15px;
    transition: width 0.3s ease;
}

progress::-moz-progress-bar {
    background: linear-gradient(90deg, #5ef5a7 0%, #4caf50 100%);
    border-radius: 15px;
}

/* Upload status container */
.upload-progress-container {
    background: #0d3b3f !important;
    border: 2px solid #5ef5a7 !important;
    border-radius: 12px !important;
    padding: 20px !important;
    margin: 20px 0 !important;
    color: white !important;
}

.upload-progress-container p,
.upload-progress-container div {
    color: #e8f5f0 !important;
    margin: 10px 0 !important;
}

.upload-progress-text {
    color: #5ef5a7 !important;
    font-weight: 600 !important;
    font-size: 16px !important;
}



/* ══════════════════════════════════════════════════════
   RESPONSIVE — small phones (< 480px)
   Preserves all existing styling, only adjusts layout
   ════════════════════════════════════════════════════ */

@media (max-width: 480px) {
    /* Colour picker modal — full screen on small phones */
    #ff-color-modal-overlay { padding: 0 !important; align-items: flex-end !important; }
    #ff-color-modal {
        max-width: 100% !important;
        max-height: 92vh !important;
        border-radius: 14px 14px 0 0 !important;
    }
    /* Print type cards — stack vertically */
    .ff-print-type-toggle { flex-direction: column !important; gap: 12px !important; }
    .ff-print-type-option { width: 100% !important; }
    /* Material / finish / infill card grids — 2 per row minimum */
    .ff-card-selector { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important; }
    .ff-compact-cards  { grid-template-columns: repeat(auto-fill, minmax(90px,  1fr)) !important; }
    /* Form section headings */
    .ff-form-section h2 { font-size: 15px !important; }
    /* Submit button full width */
    .ff-submit-btn { width: 100% !important; }
    /* Quote / order detail popup — full width */
    .ff-modal-content { width: 100% !important; margin: 0 !important; border-radius: 10px 10px 0 0 !important; }
}

@media (max-width: 600px) {
    /* Two-column form groups become single column */
    .ff-form-row { flex-direction: column !important; }
    .ff-form-group { width: 100% !important; }
    /* Colour trigger button text truncate */
    #ff-color-trigger-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
    /* Swatch grid — slightly smaller dots on phone */
    #ff-color-swatch-grid { grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)) !important; }
}

/* ── STL Preview Thumbnails ────────────────────────────────────────────────── */
.ff-preview-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 600;
    color: rgba(94, 245, 167, 0.6);
    background: transparent;
    border: 1px solid rgba(94, 245, 167, 0.2);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1.5;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.ff-preview-toggle:hover {
    border-color: rgba(94, 245, 167, 0.5);
    color: #5ef5a7;
    background: rgba(94, 245, 167, 0.05);
}
.ff-stl-preview-container {
    display: none;
    margin-top: 6px;
    border: 1px solid rgba(94,245,167,0.35);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(13, 59, 63, 0.7);
    max-width: 220px;
}
.ff-stl-preview-container canvas {
    display: block;
    max-width: 100%;
}
.ff-preview-info {
    padding: 5px 8px;
    background: rgba(0,0,0,0.25);
    border-top: 1px solid rgba(94,245,167,0.2);
}
.ff-preview-info-name {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #5ef5a7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ff-preview-info-dims {
    display: block;
    font-size: 11px;
    color: rgba(94,245,167,0.7);
    font-family: monospace;
    margin-top: 1px;
}
.ff-preview-loading,
.ff-preview-error {
    padding: 16px;
    font-size: 12px;
    color: rgba(94,245,167,0.5);
    text-align: center;
}

/* ── Product page prev/next navigation ────────────────────────────────────── */
.woocommerce-product-details__short-description ~ nav.woocommerce-pagination,
nav.woocommerce-product-next-prev,
.post-navigation,
.woocommerce .woocommerce-loop-product__link ~ .woocommerce-LoopProduct-link,
.single-product .entry-navigation {
    text-align: center;
}

/* WooCommerce next/prev post links on single product */
a.woocommerce-prev-product,
a.woocommerce-next-product,
.woocommerce-product-prev-next a,
.post-navigation .nav-previous a,
.post-navigation .nav-next a,
.woocommerce nav.product-navigation a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #5ef5a7;
    color: #5ef5a7 !important;
    font-size: 22px;
    font-weight: 700;
    text-decoration: none !important;
    transition: background .2s, color .2s;
    line-height: 1;
}

a.woocommerce-prev-product:hover,
a.woocommerce-next-product:hover,
.post-navigation .nav-previous a:hover,
.post-navigation .nav-next a:hover,
.woocommerce nav.product-navigation a:hover {
    background: #5ef5a7;
    color: #091f22 !important;
}

/* Hide text labels, keep only arrows */
a.woocommerce-prev-product span.woocommerce-prev-product__text,
a.woocommerce-next-product span.woocommerce-next-product__text,
.post-navigation .nav-previous .nav-subtitle,
.post-navigation .nav-next .nav-subtitle,
.post-navigation .screen-reader-text {
    display: none !important;
}

/* Replace text with arrow characters if theme outputs text-only links */
a.woocommerce-prev-product::before { content: '\2039'; }
a.woocommerce-next-product::before { content: '\203A'; }

/* Centre the nav container */
.woocommerce-product-next-prev,
.post-navigation,
.woocommerce nav.product-navigation {
    display: flex !important;
    justify-content: center;
    gap: 16px;
    margin: 24px 0;
}

/* HelloBiz / Hello Elementor — WooCommerce single product prev/next */
.woocommerce nav.woocommerce-pagination {
    text-align: center;
}
.woocommerce nav.woocommerce-pagination ul {
    display: inline-flex;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
}
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #5ef5a7 !important;
    color: #5ef5a7 !important;
    background: transparent !important;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none !important;
    transition: background .2s, color .2s;
}
.woocommerce nav.woocommerce-pagination ul li a:hover {
    background: #5ef5a7 !important;
    color: #091f22 !important;
}
.woocommerce nav.woocommerce-pagination ul li span.current {
    background: #5ef5a7 !important;
    color: #091f22 !important;
}

/* ── Mobile form full-width fix ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .ff-order-form-wrapper,
    .ff-printing-order-form,
    .ff-form-section,
    .ff-details-address-grid {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .ff-details-address-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
    }
    .ff-form-row {
        grid-template-columns: 1fr !important;
    }
    /* Strip Elementor container padding at every level */
    .elementor-section:has(.ff-order-form-wrapper),
    .elementor-column:has(.ff-order-form-wrapper),
    .e-con:has(.ff-order-form-wrapper),
    .e-con-inner:has(.ff-order-form-wrapper),
    .elementor-widget-container:has(.ff-order-form-wrapper),
    .elementor-section:has(.ff-printing-order-form) .elementor-container,
    .e-con:has(.ff-printing-order-form) {
        padding-left: 0 !important;
        padding-right: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* ── Quote mode toggle ──────────────────────────────────────────────────── */
.ff-quote-mode-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.ff-quote-mode-option input[type="radio"] { display: none; }
.ff-quote-mode-option .ff-mode-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    background: #071a1a;
    border: 2px solid rgba(94,245,167,0.35);
    border-radius: 12px;
    padding: 32px 24px;
    gap: 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
    user-select: none;
    min-height: 160px;
}
.ff-quote-mode-option .ff-mode-card:hover {
    border-color: rgba(94,245,167,0.65);
}
.ff-quote-mode-option input[type="radio"]:checked + .ff-mode-card {
    border-color: #5ef5a7;
    box-shadow: 0 0 0 3px rgba(94,245,167,0.1);
}
.ff-quote-mode-option input[type="radio"]:checked + .ff-mode-card::before { display: none; }
.ff-mode-card-top {
    font-size: 20px;
    font-weight: 800;
    color: #5ef5a7;
    line-height: 1.2;
    letter-spacing: -0.01em;
}
.ff-mode-card-divider {
    width: 70%;
    height: 1px;
    background: rgba(94,245,167,0.25);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ff-mode-card-diamond {
    position: absolute;
    color: #5ef5a7;
    font-size: 7px;
    background: #071a1a;
    padding: 0 4px;
}
.ff-mode-card-main {
    font-size: 13px;
    font-weight: 400;
    color: rgba(200,230,220,0.7);
    line-height: 1.45;
}
@media (max-width: 600px) {
    .ff-quote-mode-toggle { grid-template-columns: 1fr; }
}

/* ── Colour swatches ────────────────────────────────────────────────────── */
.ff-colour-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding-bottom: 28px; /* room for absolute labels */
}
.ff-swatch-btn {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    flex-shrink: 0;
    padding: 0;
    border-width: 2px;
    border-style: solid;
}
.ff-swatch-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 3px rgba(94,245,167,0.4);
}
.ff-swatch-btn.ff-swatch-selected {
    transform: scale(1.1);
    box-shadow: 0 0 0 3px #5ef5a7;
}
.ff-swatch-label {
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    white-space: nowrap;
    color: #6b7280;
    pointer-events: none;
    line-height: 1;
}
.ff-swatch-multi {
    border-radius: 8px;
    background: conic-gradient(#dc2626,#eab308,#16a34a,#2563eb,#7c3aed,#dc2626) !important;
}
#ff-swatch-selected {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(94,245,167,0.08);
    border: 1px solid rgba(94,245,167,0.3);
    border-radius: 8px;
    font-size: 13px;
    color: #d1fae5;
    margin-top: 4px;
}
@media (max-width: 600px) {
    .ff-quote-mode-toggle { grid-template-columns: 1fr; }
    .ff-swatch-btn { width: 40px; height: 40px; }
}
