/* Mobile Configurator Modal Styles - Migrated to CustomData */

.mobile-sticky-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    z-index: 1099;
    /* Below the modal but above other content */
    padding: 12px 0;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
    display: none;
    /* Hidden by default */
}

@media (max-width: 767px) {
    .mobile-sticky-bottom-bar {
        display: block;
    }

    body.mobile-modal-open .mobile-sticky-bottom-bar {
        display: none !important;
    }
}

.mobile-configurator-floating-btn {
    position: relative;
    /* Changed from fixed */
    left: auto;
    transform: none;
    margin: 0 auto;
    z-index: 1100;
    background: #667DD1;
    /* Green background */
    color: white;
    /* White text */
    border: none;
    /* Removed border since background is colored */
    border-radius: 8px;
    padding: 12px 25px;
    font-size: 16px;
    /* Slightly larger */
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
    width: 90%;
    box-sizing: border-box;
    text-decoration: none !important;
    line-height: normal;
    text-align: center;
    font-family: inherit;
}

.mobile-configurator-floating-btn * {
    box-sizing: border-box;
}

/* Removed media query handled by .mobile-sticky-bottom-bar */

.mobile-configurator-floating-btn span {
    color: white !important;
}

.mobile-configurator-floating-btn:hover,
.mobile-configurator-floating-btn:focus {
    background: #f9fff8;
    transform: translateY(-1px);
}

.mobile-configurator-floating-btn:active {
    transform: translateY(0);
}

.mobile-config-modal {
    display: none;

    &.active {
        display: block;
    }
}

.mobile-config-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.mobile-config-modal-content {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.mobile-config-modal-content *::-webkit-scrollbar {
    display: none !important;
}

.mobile-config-modal-content * {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.mobile-config-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: white;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
    z-index: 30;
    position: relative;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    /* Sombrita inferior más marcada */
}

.mobile-config-header-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 4px;
    background: white;
}

.mobile-config-header-info {
    flex: 1;
    margin-left: 15px;
    display: flex;
    flex-direction: column;
}

.mobile-config-product-name {
    font-size: 14px;
    font-weight: 600;
    margin: 0px 20px 0px 0px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #333;
}

.mobile-config-product-ref {
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
}

.mobile-config-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.mobile-config-total {
    font-size: 32px;
    font-weight: 700;
    color: #333;
}

.mobile-config-units {
    font-size: 13px;
    color: #666;
}

/* Resets for the entire modal content to beat footer styles */
.mobile-config-modal-content {
    color: #333 !important;
    text-align: left !important;
    line-height: 1.5 !important;
}

/* Force specific elements inside modal to respect color */
.mobile-config-modal-content p,
.mobile-config-modal-content label,
.mobile-config-modal-content h1,
.mobile-config-modal-content h2,
.mobile-config-modal-content h3,
.mobile-config-modal-content h4,
.mobile-config-modal-content h5,
.mobile-config-modal-content h6,
.mobile-config-modal-content span,
.mobile-config-modal-content div,
.mobile-config-modal-content table,
.mobile-config-modal-content li {
    color: #333 !important;
}

/* Exception for specific colored elements */
.high-value-badge .high-value-title {
    color: #667DD1 !important;
}

.high-value-badge .high-value-subtitle {
    color: #4b5563 !important;
}

.mobile-config-delivery {
    font-size: 12px;
    color: #667DD1 !important;
    margin-top: 2px;
}

.mobile-config-total {
    color: #333 !important;
}

.mobile-config-units-box {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #667dd1 !important;
    font-weight: 500;
    padding: 6px 12px;
    background: #f0f3ff;
    border: 1px solid #e0e7ff;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
}

.mobile-config-units-box svg {
    transition: transform 0.3s ease;
    transform: rotate(0deg);
    /* Default pointing down */
}

.mobile-config-units-box.active svg {
    transform: rotate(180deg);
    /* Point up when active */
}

.mobile-config-product-ref {
    color: #888 !important;
}

.mobile-config-toggle-details.collapsed svg,
.mobile-config-toggle-details svg {
    color: #000 !important;
}

/* Specific fix for floating button text */
.mobile-configurator-floating-btn {
    color: white !important;
}

.mobile-configurator-floating-btn span {
    color: white !important;
}

.mobile-configurator-floating-btn .icon-shopping-cart {
    color: white !important;
}

.mobile-config-toggle-details {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 700;
    color: #000;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.mobile-config-toggle-details svg {
    width: 12px;
    height: 12px;
    transition: transform 0.3s ease;
}

.mobile-config-toggle-details.collapsed svg {
    transform: rotate(180deg);
}

.mobile-config-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #333;
    background: white;
    color: #333;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.mobile-config-modal-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    background: #fff;
    z-index: 20;
    position: relative;
}

.mobile-config-details-section {
    background: #f9f9fb;
    padding: 15px 25px;
    margin: 15px;
    border-radius: 20px;
    display: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.mobile-config-details-section table {
    width: 100%;
    font-size: 15px;
    border-collapse: collapse;
}

.mobile-config-details-section td {
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
    color: #71768a !important;
    font-weight: 500;
}

.mobile-config-details-section tr:last-child td {
    border-bottom: none;
}

.mobile-config-details-section td:last-child {
    text-align: right;
    font-weight: 700;
    color: #1a1e2e !important;
}

.mobile-config-details-section .delivery-line td:first-child {
    color: #10b981 !important;
    font-weight: 600;
}

.mobile-config-details-section .delivery-line td:last-child {
    color: #10b981 !important;
}

.info-icon-summary {
    color: #667dd1;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin-left: 2px;
}

.mobile-config-modal-body iframe,
.mobile-config-modal-body product-configurator {
    width: 100%;
    flex: 1;
    border: none;
    background: white;
    min-height: 400px;
}

.mobile-config-modal-footer {
    padding: 10px 15px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex-shrink: 0;
    box-shadow: 0 -6px 16px rgba(0, 0, 0, 0.18);
    /* Sombrita superior más pronunciada */
    z-index: 30;
    position: relative;
}

.mobile-modal-footer-summary {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
}

.mobile-modal-footer-summary-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mobile-modal-footer-title {
    font-size: 13px;
    font-weight: 800;
    color: #667dd1 !important;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.02em;
}

.info-icon {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.mobile-modal-footer-summary-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.mobile-config-units {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #667dd1 !important;
    font-weight: 600;
}

.mobile-modal-vat {
    font-size: 10px;
    color: #888;
}

#mobile-personalized-banner-container {
    width: 100%;
    display: block;
}

.mobile-modal-footer-buttons {
    display: flex;
    width: 100%;
    gap: 12px;
}

.mobile-config-modal-footer button {
    padding: 14px 10px;
    border-radius: 12px;
    font-size: 14px;
    text-transform: none;
    font-weight: 700;
}

.mobile-config-modal-footer button#mobile-modal-quote {
    flex: 1;
    background: white !important;
    border: 2px solid #667dd1 !important;
    color: #667dd1 !important;
}

.mobile-config-modal-footer button#mobile-modal-quote:disabled {
    opacity: 0.6 !important;
    border: 2px solid #ddd !important;
    color: #888 !important;
}

.mobile-config-modal-footer button#mobile-modal-quote.animate-pulse-custom {
    background: #667DD1 !important;
    color: white !important;
    border: 2px solid #667DD1 !important;
}

.mobile-config-modal-footer button#mobile-modal-add-to-cart {
    flex: 1.5;
    background: #10b981 !important;
    border: 2px solid #10b981 !important;
    color: white !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 16px;
}

.mobile-config-modal-footer button#mobile-modal-add-to-cart:hover {
    background: #059669 !important;
}

.mobile-config-modal-footer button#mobile-modal-add-to-cart:disabled {
    background: #e5e7eb !important;
    border: 2px solid #e5e7eb !important;
    color: #9ca3af !important;
    opacity: 1 !important;
}

.mobile-config-modal-footer button#mobile-modal-add-to-cart svg {
    color: white !important;
}

.mobile-config-modal-footer button#mobile-modal-add-to-cart:disabled svg {
    color: #6b7280 !important;
}

body.mobile-modal-open {
    overflow: hidden;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

/* Mobile Quote Form Styles (Rounded Design) */
#mobile-quote-form-container {
    padding: 20px !important;
    background: #fff;
    display: block;
    width: 100% !important;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    display: block;
    /* Revert flex since we use absolute positioning for footer */
    padding-bottom: 90px !important;
    /* Space for the fixed footer */
}

#mobile-quote-form-container::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

#mobile-quote-form-container * {
    max-width: 100% !important;
}

#mobile-quote-form-container #presupuestos_solicitud {
    display: block !important;
    width: 100% !important;
}

#mobile-quote-form-container p.mobile-form-title {
    text-align: left;
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
    font-weight: 500;
    line-height: 1.3;
}

#mobile-quote-form-container p:not(.mobile-form-title) {
    font-size: 14px;
    margin-bottom: 15px;
}

.mobile-input-group {
    margin-bottom: 5px;
    text-align: left;
}

.mobile-input-label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    font-size: 14px;
    color: #333;
}

.mobile-styled-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: all 0.2s;
    height: 48px;
    color: #374151 !important;
}

.mobile-styled-input::placeholder {
    color: #9CA3AF !important;
}

.mobile-styled-input:focus {
    border-color: #667DD1;
    box-shadow: 0 0 0 3px rgba(102, 125, 209, 0.1);
}

.mobile-form-actions {
    display: flex;
    gap: 15px;
    margin: 0;
    position: absolute;
    /* Force to bottom of modal content */
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    z-index: 1000;
    padding: 15px 20px;
    border-top: 1px solid #f3f4f6;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    width: 100%;
    justify-content: center;
}

.mobile-form-actions button {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    height: 48px;
    text-transform: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

#mobile-form-back.btn-mobile-back {
    background: #fff !important;
    border: 1px solid #D1D5DB !important;
    color: #374151 !important;
    margin-top: 0 !important;
}

.presu_enviar.btn-mobile-send {
    background: #667dd1 !important;
    border: 1px solid #667dd1 !important;
    color: white !important;
}

.presu_enviar.btn-mobile-send:hover {
    background: #667DD1 !important;
}

.presu_enviar.btn-mobile-send:disabled {
    opacity: 0.7;
    cursor: wait;
}

.presu_enviar.btn-mobile-send i {
    margin-right: 8px;
}

/* Privacy checkbox adjust */
#mobile-quote-form-container #presupuestos_solicitud .input-presu {
    padding: 0;
    margin-bottom: 0;
    display: block;
    width: 100%;
}

#mobile-quote-form-container #presupuestos_solicitud .input-presu br,
#mobile-quote-form-container #presupuestos_solicitud .input-presu>div:not(.mobile-input-group),
#mobile-quote-form-container #relleno {
    display: none !important;
}

#mobile-quote-form-container #presupuestos_solicitud .input-presu label {
    font-weight: 400;
    font-size: 13px;
    color: #555;
    vertical-align: middle;
}

#mobile-quote-form-container #presupuestos_solicitud input[type="checkbox"] {
    margin-right: 5px;
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

@media (max-width: 768px) {

    .rp-chat-widget .chat-toggle,
    .cky-btn-revisit-wrapper {
        bottom: 80px !important;
    }

    #gtm-chat-nudge {
        bottom: 160px !important;
    }
}

body.mobile-modal-open #gtm-chat-nudge,
body.mobile-modal-open .rp-chat-widget .chat-toggle,
body.mobile-modal-open .cky-btn-revisit-wrapper {
    z-index: 1 !important;
}

/* Final overrides for specific colors */
#mobile-configurator-modal .mobile-modal-footer-title,
#mobile-toggle-title,
#mobile-toggle-title * {
    color: #667dd1 !important;
}

.mobile-config-units-box {
    background: #f0f3ff !important;
    border: 1px solid #dce2ff !important;
    border-radius: 12px !important;
}

/* Fix for iPhone: Hide PS footer when React side drawer is open */
#mobile-configurator-modal.drawer-open .mobile-config-modal-footer {
    display: none !important;
}

#mobile-configurator-modal.drawer-open .mobile-config-modal-header {
    z-index: 10 !important;
}

#mobile-configurator-modal.drawer-open .mobile-config-modal-body {
    overflow: visible !important;
}