/**
 * ITNES Product Configurator Styles
 */

.itnes-product-configurator {
    margin: 30px 0 20px 0;
    border-bottom: 1px solid #e5e5e5;
    /* padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); */
}

.configurator-title {
    font-size: 18px;
    font-weight: 400;
    color: #333;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e5e5;
}

.configurator-category {
    margin-bottom: 15px;
}

.category-title {
    font-size: 12px;
    font-weight: 400;
    color: #666;
    margin: 0 0 5px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.configurator-options {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 8px;
}

.configurator-option-wrapper {
    flex: 1;
    display: flex;
    align-items: stretch;
    line-height: 1.1;
    min-width: fit-content;
}

.configurator-option {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 6px 8px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: center;
    position: relative;
    transform: translateY(0);
    gap: .7em;
}

.configurator-option:hover {
    border-color: #006bb7;
    background: #f8fcff;
}

.configurator-option--selected {
    border-color: #006bb7 !important;
    background: #e6f3ff !important;
    color: #006bb7 !important;
    cursor: default;
}

.configurator-option--quote {
    border-color: #999;
    color: #666;
}

.configurator-option--quote:hover {
    border-color: #666;
    background: #f5f5f5;
}

.configurator-option--quote.configurator-option--selected {
    border-color: #006bb7 !important;
    background: #e6f3ff !important;
    color: #006bb7 !important;
}

.configurator-option--link {
    border-color: #e0e0e0;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .4em;
}

.option-name {
    display: block;
    /* margin-bottom: 4px;
    font-weight: 500; */
    display: flex;
    flex-direction: column;
    gap: .1em;
}

.option-price {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: #666;
}

.configurator-option--selected .option-name {
    font-weight: 600;
}

.configurator-btn {
    display: inline-block;
    padding: 12px 24px;
    border: 1px solid #006bb7;
    border-radius: 8px;
    background: #006bb7;
    color: #fff !important;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.configurator-btn:hover {
    background: #005a9e;
    border-color: #005a9e;
    color: #fff !important;
    text-decoration: none;
}

.configurator-btn--secondary {
    background: #f8fcff;
    color: #006bb7 !important;
    border-color: #006bb7;
}

.configurator-btn--secondary:hover {
    background: #e6f3ff;
    color: #006bb7 !important;
}

.configurator-btn--warranty {

    background: #006bb7;
    color: #fff !important;
    border-color: #006bb7;
    padding: 10px 20px;
    font-size: 14px;
}

.configurator-btn--warranty:hover {
    background: #005a9e;
    border-color: #005a9e;
    color: #fff !important;
}

.configurator-warranty, .configurator-actions {
    margin: 20px 0;
    text-align: left;
}

.icon {
    margin-left: 8px;
}

/* Responsive design */
@media (max-width: 768px) {
    .configurator-options {
        flex-direction: column;
        flex-wrap: nowrap;
    }
    
    .configurator-option-wrapper {
        flex: none;
    }
    
    .configurator-option {
        width: 100%;
        min-width: auto;
    }
    
    .itnes-product-configurator {
        margin: 15px 0;
        padding: 15px;
    }
}

/* Animation for smooth transitions */
.configurator-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.configurator-btn {
    transform: translateY(0);
}

.configurator-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 107, 183, 0.3);
}

/* Modal Styles */
.configurator-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

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

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

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

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

/* Body scroll lock when modal is open */
body.modal-open {
    /* overflow: hidden; */
    position: fixed;
    width: 100%;
}

.configurator-modal {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.1s ease-out;
}

.configurator-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e5e5e5;
}

.configurator-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.configurator-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.1s ease;
}

.configurator-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.configurator-modal-body {
    padding: 25px;
}

.selected-options {
    margin-bottom: 20px;
}

.selected-options h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.selected-options ul {
    margin: 0;
    padding-left: 20px;
}

.selected-options li {
    margin-bottom: 5px;
    color: #666;
}

.configurator-info-box {
    background: #f8fcff;
    border: 1px solid #006bb7;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 25px;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #006bb7;
    box-shadow: 0 0 0 2px rgba(0, 107, 183, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.configurator-btn--submit {
    background: #006bb7;
    color: #fff !important;
    border-color: #006bb7;
    flex: 1;
}

.configurator-btn--submit:hover {
    background: #005a9e;
    border-color: #005a9e;
}

.configurator-btn--cancel {
    background: #dc3545;
    color: #fff !important;
    border-color: #dc3545;
    flex: 1;
}

.configurator-btn--cancel:hover {
    background: #c82333;
    border-color: #c82333;
}

/* Responsive modal */
@media (max-width: 768px) {
    .configurator-modal {
        width: 95%;
        margin: 20px;
    }
    
    .configurator-modal-header,
    .configurator-modal-body {
        padding: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .configurator-btn--submit,
    .configurator-btn--cancel {
        flex: none;
    }
}

#configurator-form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Bootstrap Modal Styles for Configurator */
#configurator-modal .modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

#configurator-modal .product-info {
    display: flex;
    justify-content: space-evenly;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

#configurator-modal .product-image {
    /* flex: 0 0 100px; */
    /* margin-right: 15px; */
}

#configurator-modal .product-image img {
    max-width: 100%;
    height: auto;
}

#configurator-modal .product-details h6 {
    font-weight: bold;
    margin-bottom: 10px;
}

#configurator-modal .modal-title {
    font-weight: bold;
    text-transform: uppercase;
    color: #333;
}

#configurator-modal .form-group {
    margin-bottom: 15px;
}

#configurator-modal .itnes_form_group {
    float: none;
    display: flex;
    align-items: center;
    gap: 1em;
}

#configurator-modal label {
    font-weight: 600;
    display: block;
    margin-bottom: 0;
    min-width: fit-content;
    min-width: 30%;
}

#configurator-modal .required {
    color: #dc3545;
}

#configurator-modal .required-info {
    font-size: 0.8em;
    color: #6c757d;
    margin-top: 10px;
}

#configurator-modal .form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    width: 100%;
}

#configurator-modal .form-check-label {
    font-weight: normal;
    font-size: 0.9em;
}

#configurator-modal input.form-control,
#configurator-modal textarea.form-control {
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
    font-size: 14px;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    font-weight: 400;
    letter-spacing: 2px;
}

#configurator-modal input.form-control:focus,
#configurator-modal textarea.form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#configurator_privacy {
    margin-left: 1em;
    width: auto;
    position: relative;
    margin: 0 0 0 2em;
  }
