/* TARPUNO Builder Styles - Black & White Theme */

.tcb-builder {
    max-width: 1000px;
    margin: 40px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
}

/* Step Header */
.tcb-step-header {
    text-align: center;
    margin-bottom: 40px;
}

.tcb-step-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: #000000;
    margin: 0 0 10px 0;
}

.tcb-step-header p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* Steps */
.tcb-step {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cover Type Selection */
.tcb-cover-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.tcb-cover-type-card {
    padding: 30px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.tcb-cover-type-card:hover {
    border-color: #000000;
    background: #f5f5f5;
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.tcb-cover-type-card.tcb-selected {
    border-color: #000000;
    background: #e8e8e8;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
}

.tcb-cover-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
}

.tcb-cover-icon svg {
    width: 100%;
    height: 100%;
}

.tcb-cover-type-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 10px 0;
}

.tcb-cover-type-card p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Measurements Guide */
.tcb-measurements-guide {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.tcb-guide-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tcb-guide-image svg {
    max-width: 100%;
    height: auto;
}

.tcb-guide-tips h4 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 15px 0;
}

.tcb-guide-tips ul {
    margin: 0;
    padding-left: 20px;
}

.tcb-guide-tips li {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Form Groups */
.tcb-measurements-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

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

.tcb-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.tcb-form-group input[type="number"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.tcb-form-group input[type="number"]:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/* Override when inside number control */
.tcb-number-control input[type="number"] {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 12px 8px !important;
}

/* Plus/Minus Number Controls */
.tcb-number-control {
    display: flex;
    align-items: center;
    position: relative;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    padding: 6px;
    gap: 6px;
    background: #ffffff;
}

.tcb-number-control:focus-within {
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.tcb-number-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #f0f0f0;
    border-radius: 6px;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    color: #333;
    flex-shrink: 0;
}

.tcb-number-btn:hover {
    background: #e0e0e0;
}

.tcb-number-btn:active {
    background: #d0d0d0;
}

.tcb-number-control input[type="number"] {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    border: none;
    padding: 0;
    height: 40px;
    line-height: 40px;
    background: transparent;
    -moz-appearance: textfield;
    min-width: 0;
}

.tcb-number-control input[type="number"]::-webkit-outer-spin-button,
.tcb-number-control input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.tcb-number-control input[type="number"]:focus {
    outline: none;
}

.tcb-field-description {
    margin: 8px 0 0 0;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

/* Radio Buttons */
.tcb-hood-options {
    display: flex;
    gap: 20px;
}

.tcb-radio-label {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tcb-radio-label:hover {
    border-color: #000000;
    background: #f5f5f5;
}

.tcb-radio-label input[type="radio"] {
    margin-right: 10px;
}

.tcb-radio-label input[type="radio"]:checked + span {
    font-weight: 600;
    color: #000000;
}

/* Color Grid */
.tcb-color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}

.tcb-color-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.tcb-color-card:hover {
    border-color: #000000;
    background: #f5f5f5;
    transform: translateY(-3px);
}

.tcb-color-card.tcb-selected {
    border-color: #000000;
    background: #e8e8e8;
    box-shadow: 0 4px 12px rgba(12, 167, 222, 0.2);
}

.tcb-color-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.tcb-color-name {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    text-align: center;
}

/* File Upload */
.tcb-upload-container {
    max-width: 600px;
    margin: 0 auto;
}

.tcb-upload-dropzone {
    padding: 60px 40px;
    border: 3px dashed #e0e0e0;
    border-radius: 12px;
    text-align: center;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

.tcb-upload-dropzone.tcb-dragover {
    border-color: #000000;
    background: #e8e8e8;
}

.tcb-upload-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    color: #999;
}

.tcb-upload-dropzone p {
    font-size: 16px;
    color: #666;
    margin: 10px 0;
}

.tcb-upload-or {
    font-size: 14px;
    color: #999;
    margin: 15px 0 !important;
}

.tcb-uploaded-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 30px;
}

.tcb-uploaded-image-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tcb-uploaded-image-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.tcb-remove-image {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tcb-remove-image:hover {
    background: rgba(255, 0, 0, 1);
    transform: scale(1.1);
}

/* Review Page */
.tcb-review-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.tcb-review-visualization {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #f9f9f9;
    border-radius: 12px;
}

#tcb-cover-preview svg {
    max-width: 100%;
    height: auto;
}

.tcb-review-details h3 {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 20px 0;
}

.tcb-details-table {
    width: 100%;
    margin-bottom: 30px;
}

.tcb-details-table tr {
    border-bottom: 1px solid #e0e0e0;
}

.tcb-details-table td {
    padding: 12px 0;
    font-size: 14px;
}

.tcb-details-table td:first-child {
    color: #666;
}

.tcb-details-table td:last-child {
    color: #1a1a1a;
    font-weight: 500;
}

.tcb-price-summary {
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
    border: 2px solid #000000;
}

.tcb-price-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 16px;
}

.tcb-total-price {
    margin-top: 10px;
    padding-top: 15px;
    border-top: 2px solid #000000;
    font-size: 20px;
    font-weight: 700;
    color: #000000;
}

/* Progress Bar */
.tcb-progress-bar {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    margin: 40px 0 30px;
    overflow: hidden;
}

.tcb-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #000000 0%, #000000 100%);
    transition: width 0.4s ease;
}

/* Navigation Buttons */
.tcb-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
}

.tcb-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tcb-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

.tcb-btn-primary {
    background: #000000;
    color: white;
}

.tcb-btn-primary:hover {
    background: #333333;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.tcb-btn-secondary {
    background: #f0f0f0;
    color: #1a1a1a;
}

.tcb-btn-secondary:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.tcb-btn-success {
    background: #000000;
    color: white;
}

.tcb-btn-success:hover {
    background: #333333;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Loading Overlay */
.tcb-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.tcb-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.tcb-loading-overlay p {
    color: white;
    font-size: 18px;
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .tcb-builder {
        padding: 20px;
        margin: 20px;
    }
    
    .tcb-cover-types {
        grid-template-columns: 1fr;
    }
    
    .tcb-measurements-guide {
        grid-template-columns: 1fr;
    }
    
    .tcb-measurements-form {
        grid-template-columns: 1fr;
    }
    
    .tcb-color-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .tcb-review-container {
        grid-template-columns: 1fr;
    }
    
    .tcb-navigation {
        flex-direction: column;
    }
    
    .tcb-btn {
        width: 100%;
        justify-content: center;
    }
}
