/* cablebuilder.css - Complete Styles for Cable Builder Module */

/* ===== Base Styles ===== */
.cable-builder-container {
    font-family: 'Open Sans', sans-serif;
    margin: 20px 0;
    color: #333;
}

/* ===== Panel & Header Styles ===== */
.cable-builder-container .panel {
    border: 1px solid #e7e7e7;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    background: #fff;
}

.cable-builder-container .panel-heading {
    background-color: #f8f8f8;
    border-bottom: 1px solid #e7e7e7;
    padding: 15px 20px;
    border-radius: 5px 5px 0 0;
}

.cable-builder-container .panel-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #333;
}

/* ===== Progress Steps ===== */
.builder-steps {
    display: flex;
    justify-content: space-between;
    margin: 0 auto 30px;
    max-width: 800px;
    position: relative;
}

.builder-steps:before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0e0e0;
    z-index: 1;
}

.builder-steps .step {
    text-align: center;
    position: relative;
    z-index: 2;
    flex: 1;
    padding: 0 10px;
}

.builder-steps .step span {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    font-weight: bold;
    margin-bottom: 5px;
    position: relative;
    transition: all 0.3s ease;
}

.builder-steps .step.completed span {
    background: #3498db;
    color: white;
}

.builder-steps .step.active span {
    background: #2ecc71;
    color: white;
    transform: scale(1.1);
}

.builder-steps .step p {
    font-size: 12px;
    color: #999;
    margin: 0;
    transition: all 0.3s ease;
}

.builder-steps .step.completed p,
.builder-steps .step.active p {
    color: #333;
    font-weight: 500;
}

/* ===== Step Containers ===== */
.builder-step {
    display: none;
    padding: 20px 0;
}

.builder-step.active {
    display: block;
}

.step-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* ===== Category Selection ===== */
.category-selection {
    margin-top: 10px;
}

.category-card {
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    background: #fff;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #3498db;
}

.category-card.selected {
    border-color: #2ecc71;
    background-color: #f8fff8;
}

.category-card img {
    width: 100%;
    height: auto;
    max-height: 120px;
    object-fit: contain;
    padding: 15px;
}

.category-card .card-body {
    padding: 15px;
    text-align: center;
    border-top: 1px solid #eee;
}

.category-card .card-title {
    font-size: 16px;
    margin: 0;
    font-weight: 600;
}

/* ===== Cable Visualization ===== */
.cable-visualization {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 5px;
    margin-bottom: 20px;
    position: relative;
}

.component-container {
    margin: 10px 0;
}

.component-image {
    max-height: 80px;
    margin: 0 auto 10px;
    display: block;
}

.component-label {
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    margin-top: 5px;
}

.connector-a, .connector-b {
    text-align: center;
}

.cable {
    text-align: center;
    margin: 20px 0;
}

/* ===== Configuration Options ===== */
.configuration-options {
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #eee;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Length Selector */
.length-selector-container {
    margin-top: 15px;
}

.total-length-display {
    font-size: 14px;
    margin-top: 5px;
    color: #666;
}

/* ===== Review Step ===== */
.review-container {
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #eee;
}

.review-visualization {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
}

.review-image {
    max-height: 80px;
    margin: 0 auto 10px;
    display: block;
}

.review-label {
    font-weight: 500;
    margin-bottom: 5px;
}

.review-detail {
    font-size: 14px;
    color: #666;
}

.review-summary table {
    width: 100%;
    margin-bottom: 20px;
}

.review-summary table td {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.review-summary table tr:last-child td {
    border-bottom: none;
}

.review-summary .total-row td {
    font-weight: bold;
    font-size: 16px;
}

/* ===== Price Display ===== */
.price-display {
    text-align: right;
    font-size: 18px;
    margin-bottom: 20px;
}

.price-label {
    margin-right: 10px;
}

.price-value {
    font-weight: bold;
    color: #2ecc71;
}

/* ===== Navigation Buttons ===== */
.builder-navigation {
    margin-top: 30px;
    text-align: right;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.btn-default {
    background: #f8f8f8;
    color: #333;
    border-color: #ddd;
}

.btn-default:hover {
    background: #e0e0e0;
}

.btn-primary {
    background: #3498db;
    color: white;
}

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

.btn-success {
    background: #2ecc71;
    color: white;
}

.btn-success:hover {
    background: #27ae60;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
}

.btn-block {
    display: block;
    width: 100%;
}

.hidden {
    display: none !important;
}

/* ===== Responsive Styles ===== */
@media (max-width: 767px) {
    .builder-steps .step p {
        display: none;
    }
    
    .builder-steps .step span {
        width: 26px;
        height: 26px;
        line-height: 26px;
        font-size: 12px;
    }
    
    .builder-steps:before {
        top: 13px;
    }
    
    .category-card .card-title {
        font-size: 14px;
    }
    
    .configuration-options {
        padding: 15px;
    }
    
    .builder-navigation {
        text-align: center;
    }
    
    .builder-navigation .btn {
        display: block;
        width: 100%;
        margin: 10px 0;
    }
    
    .review-container .row > div {
        margin-bottom: 20px;
    }
}

/* ===== Utility Classes ===== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-3 {
    margin-top: 15px;
}

.mt-4 {
    margin-top: 20px;
}

/* ===== Loading Animation ===== */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading-spinner {
    animation: spin 1s infinite linear;
    display: inline-block;
    margin-right: 8px;
}

/* ===== Alert Messages ===== */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-warning {
    color: #8a6d3b;
    background-color: #fcf8e3;
    border-color: #faebcc;
}