/* ====================================
   Multi-Step Quotation Form Styles
   ==================================== */

/* CSS Variables */
:root {
    --primary-color: #0066cc;
    --primary-hover: #0052a3;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --border-color: #ddd;
    --background-light: #f8f9fa;
    --text-dark: #333;
    --text-muted: #6c757d;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.2);
    --transition-speed: 0.3s;
}

/* Universal Box Sizing */
*, *::before, *::after {
    box-sizing: border-box;
}

/* General Container */
.quotation-form-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: "Roboto",sans-serif;
}

/* ====================================
   Progress Indicator
   ==================================== */
.progress-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    position: relative;
    padding: 0 20px;
}

.progress-indicator::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border-color);
    z-index: 0;
}

.progress-step {
    flex: 1;
    text-align: center;
    position: relative;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.progress-step .step-number {
    display: inline-block;
    width: 50px;
    height: 50px;
    line-height: 50px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--border-color);
    color: var(--text-muted);
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    transition: all var(--transition-speed);
}

.basket-counter {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    font-size: 12px;
    font-weight: bold;
    min-width: 20px;
    height: 20px;
    line-height: 20px;
    border-radius: 10px;
    padding: 0 5px;
    z-index: 2;
}

.progress-step .step-title {
    display: block;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.progress-step.active .step-number {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.progress-step.active .step-title {
    color: var(--primary-color);
    font-weight: 600;
}

.progress-step.completed .step-number {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.progress-step.completed .step-title {
    color: var(--success-color);
}

/* Basket step - always clickable */
.progress-step.clickable {
    cursor: pointer;
}

.progress-step.clickable .step-number {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.progress-step.clickable .step-title {
    color: var(--primary-color);
    font-weight: 500;
}

.progress-step.clickable:hover .step-number {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
}

.progress-step.clickable:hover .step-title {
    font-weight: 600;
}

/* Basket step icon styling - ALWAYS clickable */
.progress-step[data-step="basket"] {
    cursor: pointer !important;
}

.progress-step[data-step="basket"] .step-number {
    align-items: center;
    justify-content: center;
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

.progress-step[data-step="basket"] .step-title {
    color: var(--primary-color);
    font-weight: 500;
}

.progress-step[data-step="basket"]:hover .step-number {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
}

.progress-step[data-step="basket"]:hover .step-title {
    font-weight: 600;
}

.progress-step[data-step="basket"] .step-number svg {
    width: 20px;
    height: 20px;
    margin-top: 15px;
}

/* When basket is active */
.progress-step[data-step="basket"].active .step-number {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.2);
}

/* ====================================
   Form Steps
   ==================================== */
.multi-step-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    min-height: 350px;
}

.form-step h2 {
    margin-bottom: 30px;
    color: var(--text-dark);
    font-size: 24px;
    font-weight: 600;
}

/* Quotation heading classes to override Breakdance styles */
.quotation-heading {
    font-size: 24px !important;
    font-weight: 600 !important;
    color: var(--text-dark) !important;
    margin-bottom: 30px !important;
}

.basket-header .quotation-heading {
    margin-top: 0px !important;
    margin-bottom: 0px !important;
}

/* Sub-Steps */
.sub-step {
    display: none;
}

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

/* ====================================
   Card Grids (Product/Type/Material/Style Selection)
   ==================================== */
.card-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.category-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.type-grid {
    grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
}

.material-grid {
    grid-template-columns: repeat(auto-fill, minmax(max(200px, calc((100% - 40px) / 3)), 1fr));
}

.style-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    max-height: 500px;
    overflow-y: scroll;
    overflow-x: hidden;
    padding-right: 10px;
    padding-top: 5px;
}

.opening-grid {
    grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
}

.opening-card-title {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: var(--text-dark) !important;
}

.image-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all var(--transition-speed);
    text-align: center;
}

.image-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.image-card.selected {
    border-color: var(--primary-color);
    background: rgba(0, 102, 204, 0.05);
    box-shadow: var(--shadow-md);
}

.type-grid .image-card .card-image {
    width: 100%;
    height: 175px;
    background: #fff;
    border-radius: 4px;
    margin-bottom: 15px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-card .card-image {
    width: 100%;
    height: 350px;
    background: #fff;
    border-radius: 4px;
    margin-bottom: 15px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.style-grid .image-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.image-card h3 {
    margin: 0;
    font-size: 18px;
    color: var(--text-dark);
    font-weight: 600;
}

/* Quotation subheading class to override Breakdance styles */
.quotation-subheading {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: var(--text-dark) !important;
}

.style-card .card-image {
    height: 120px;
}

/* ====================================
   Configuration Step
   ==================================== */
.configuration-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

.configuration-preview {
    background: var(--background-light);
    padding: 20px;
    border-radius: 8px;
    position: sticky;
    top: 20px;
    height: fit-content;
}

.configuration-preview h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 20px;
}

.preview-image {
    width: 100%;
    height: 200px;
    background: white;
    border-radius: 4px;
    margin-bottom: 15px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.preview-details {
    background: white;
    padding: 15px;
    border-radius: 4px;
}

.preview-details p {
    margin: 8px 0;
    font-size: 14px;
}

.configuration-form h2 {
    margin-top: 0;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input[type="number"],
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="file"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    transition: border-color var(--transition-speed);
    box-sizing: border-box;
    max-width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.field-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-muted);
}

.field-description {
    display: block;
    margin: 5px 0 10px 0;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Segment Widths for Bay Windows */
#segment-widths-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.segment-width-field label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    font-size: 13px;
    color: var(--text-dark);
}

.segment-width-field input[type="number"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    transition: border-color var(--transition-speed);
    box-sizing: border-box;
}

.segment-width-field input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* Checkbox label styling */
.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-label span {
    line-height: 18px;
}

/* Availability (when is someone at home) section */
.availability-subtext {
    margin: 0 0 16px;
    color: var(--text-light, #6b7280);
    font-size: 14px;
}

.availability-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px 10px;
}

.availability-option {
    font-weight: 400;
    font-size: 13px;
    gap: 6px;
    white-space: nowrap;
    align-items: center;
}

.availability-option span {
    white-space: nowrap;
    line-height: 1;
}

.availability-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    vertical-align: middle;
}

.availability-note {
    margin: 16px 0 0;
    color: var(--text-light, #6b7280);
    font-size: 13px;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .availability-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.file-preview {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.file-preview-item {
    position: relative;
    display: inline-block;
    padding: 8px 12px;
    background: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 13px;
}

.file-preview-item .remove-file {
    margin-left: 8px;
    color: var(--danger-color);
    cursor: pointer;
    font-weight: bold;
}

.file-preview-item .remove-file:hover {
    color: #a02929;
}

.file-preview-error {
    color: var(--danger-color);
    font-size: 12px;
    margin-top: 5px;
}

/* Colour Selection */
.colour-selection {
    margin-bottom: 20px;
    padding: 15px;
    background: var(--background-light);
    border-radius: 4px;
}

.colour-selection h4 {
    margin: 0 0 10px 0;
    font-size: 16px !important;
    color: var(--text-dark);
}

.colour-picker-container input[type="text"] {
    width: 100%;
    margin-bottom: 15px;
}

.colour-grid {
    max-height: 300px;
    overflow-y: auto;
}

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

.colour-category h5 {
    margin: 0 0 10px 0;
    font-size: 15px !important;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
}

.colour-items {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.colour-item {
    cursor: pointer;
    padding: 8px;
    border: 2px solid transparent;
    border-radius: 4px;
    transition: all var(--transition-speed);
}

.colour-item:hover {
    border-color: var(--primary-color);
    background: white;
}

.colour-item.selected {
    border-color: var(--primary-color);
    background: rgba(0, 102, 204, 0.1);
}

.colour-swatch {
    width: 100%;
    height: 60px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    margin-bottom: 5px;
}

.colour-swatch.has-image {
    padding: 0;
    overflow: hidden;
}

.colour-swatch img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 3px;
}

.colour-label {
    display: block;
    font-size: 12px;
    text-align: center;
    color: var(--text-dark);
    line-height: 1.4;
}

.colour-selection-display {
    margin-top: 10px;
    font-size: 14px;
}

.colour-selection-display strong {
    color: var(--primary-color);
}

/* Aluminium Colour Type Selection */
.aluminium-colour-type-selection {
    margin-bottom: 30px;
}

.aluminium-type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.aluminium-type-card {
    padding: 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    background: white;
}

.aluminium-type-card:hover {
    border-color: var(--primary-color);
    background: rgba(0, 102, 204, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.aluminium-type-card.selected {
    border-color: var(--primary-color);
    background: rgba(0, 102, 204, 0.1);
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.2);
}

.aluminium-type-card h4 {
    margin: 0 0 10px 0;
    font-size: 18px !important;
    color: var(--text-dark);
}

.aluminium-type-card p {
    margin: 0;
    font-size: 13px;
    color: #666;
}

/* Hardware Colour Selection */
.hardware-colour-selection {
    padding: 15px;
    background: var(--background-light);
    border-radius: 4px;
}

.hardware-colour-grid {
    max-height: 300px;
    overflow-y: auto;
}

/* Glazing Type Selection */
.glazing-type-selection {
    margin-bottom: 20px;
    padding: 15px;
    background: var(--background-light);
    border-radius: 4px;
}

.glazing-type-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.glazing-type-card {
    cursor: pointer;
    text-align: center;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 15px;
    transition: all var(--transition-speed);
    background: white;
}

.glazing-type-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.glazing-type-card.selected {
    border-color: var(--primary-color);
    background: rgba(0, 102, 204, 0.1);
}

.glazing-type-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.glazing-type-icon img {
    width: 80px;
    height: 50px;
    object-fit: contain;
}

.glazing-type-label {
    font-size: 12px;
    line-height: 1.4;
    font-weight: 500;
    color: var(--text-dark);
}

.glazing-type-selection-display {
    margin-top: 10px;
    font-size: 14px;
}

.glazing-type-selection-display strong {
    color: var(--primary-color);
}

/* Glazing Pattern Selection */
.glazing-pattern-selection {
    margin-top: 15px;
}

.glazing-pattern-grid {
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: 10px;
}

.glazing-pattern-card {
    cursor: pointer;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    transition: all var(--transition-speed);
    background: white;
}

.glazing-pattern-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.glazing-pattern-card.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.2);
}

.glazing-pattern-image {
    width: 100%;
    height: 55px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.glazing-pattern-label {
    padding: 4px;
    font-size: 10px;
    text-align: center;
    color: var(--text-dark);
    background: #f9f9f9;
}

/* Glazing Features Selection */
.glazing-features-selection {
    margin-bottom: 20px;
    padding: 15px;
    background: var(--background-light);
    border-radius: 4px;
}

.glazing-features-picker-container input[type="text"] {
    width: 100%;
    margin-bottom: 15px;
}

/* Glazing Features Grid */
.glazing-features-grid {
    max-height: 300px;
    overflow-y: auto;
}

.glazing-feature-category {
    margin-bottom: 15px;
}

.glazing-feature-category h5 {
    margin: 0 0 10px 0;
    font-size: 15px !important;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
}

.glazing-feature-items {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.glazing-feature-item {
    cursor: pointer;
    padding: 8px;
    border: 2px solid transparent;
    border-radius: 4px;
    transition: all var(--transition-speed);
}

.glazing-feature-item:hover {
    border-color: var(--primary-color);
    background: white;
}

.glazing-feature-item.selected {
    border-color: var(--primary-color);
    background: rgba(0, 102, 204, 0.1);
}

.glazing-feature-swatch {
    width: 100%;
    height: 80px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    font-size: 11px;
    text-align: center;
    padding: 5px;
}

.glazing-feature-swatch.has-image {
    padding: 0;
    overflow: hidden;
    background: white;
}

.glazing-feature-swatch img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 3px;
}

.glazing-feature-label {
    display: block;
    font-size: 12px;
    text-align: center;
    color: var(--text-dark);
    line-height: 1.4;
}

.glazing-features-selection-display {
    margin-top: 10px;
    font-size: 14px;
}

.glazing-features-selection-display strong {
    color: var(--primary-color);
}

/* Configuration Actions */
.configuration-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* ====================================
   Basket Review
   ==================================== */
.basket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.basket-header h2 {
    margin-bottom: 0;
}

.btn-home {
    padding: 8px 20px !important;
    font-size: 14px !important;
    background-color: #FFC407 !important;
    color: #1E3A8A !important;
    text-decoration: none !important;
}

.basket-count {
    margin-bottom: 30px;
    font-size: 16px;
    color: var(--text-muted);
}

.basket-count strong {
    color: var(--primary-color);
}

.empty-basket {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 18px;
}

#basket-items-container {
    margin-bottom: 30px;
    min-height: 150px;
}

.basket-item {
    background: var(--background-light);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 150px 1fr auto;
    gap: 20px;
    align-items: start;
}

.item-thumbnail {
    width: 150px;
    background: white;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.item-thumbnail img {
    width: 100%;
    height: 120px;
    object-fit: contain;
}

.item-thumbnail .style-name {
    margin: 5px 0;
    padding: 5px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    color: #333;
    line-height: 1.2;
}

.item-details h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.item-location {
    margin: 5px 0 15px 0;
    font-size: 14px;
}

.set-location-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    display: inline-block;
    margin-bottom: 15px;
}

.set-location-link:hover {
    text-decoration: underline;
}

.item-summary {
    width: 100%;
    border-collapse: collapse;
}

.item-summary td {
    padding: 8px 8px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
}

.item-summary td:first-child {
    padding-right: 15px;
    width: 180px;
}

.editable-field {
    cursor: pointer;
    color: var(--primary-color);
    transition: background var(--transition-speed);
    padding-left: 5px;
}

.editable-field:hover {
    background: rgba(0, 102, 204, 0.1);
}

.basket-edit-hint {
    margin: 12px 0 0 0;
    padding-top: 10px;
    font-size: 13px;
    color: #888;
    font-style: italic;
}

.item-attached-files {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.item-attached-files p {
    margin: 0 0 8px 0;
    font-size: 14px;
}

.attached-files-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.attached-files-list li {
    padding: 5px 0;
    font-size: 13px;
    color: var(--text-muted);
}

.item-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.basket-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

/* ====================================
   Review & Submission Step
   ==================================== */
.review-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.customer-details-form {
    background: var(--background-light);
    padding: 25px;
    border-radius: 8px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 24px;
    align-content: start;
}

.customer-details-form .form-group.full-width {
    grid-column: 1 / -1;
}

.order-summary {
    background: var(--background-light);
    padding: 25px;
    border-radius: 8px;
    position: sticky;
    top: 20px;
    height: fit-content;
}

.order-summary h3 {
    margin-top: 0;
    margin-bottom: 20px;
}

.summary-item {
    background: white;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.summary-item h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: var(--primary-color);
}

.summary-item p {
    margin: 5px 0;
    font-size: 14px;
}

/* ====================================
   Buttons
   ==================================== */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #5a6268;
    box-shadow: var(--shadow-md);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #c82333;
    box-shadow: var(--shadow-md);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

/* Form Navigation */
.form-navigation {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

/* ====================================
   Modal
   ==================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 28px;
    color: var(--text-muted);
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-speed);
}

.modal-close:hover {
    color: var(--text-dark);
}

.modal-content h3 {
    margin: 0 0 20px 0;
}

#edit-item-content {
    margin-bottom: 20px;
}

.edit-field-group {
    margin-bottom: 15px;
}

.edit-field-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
}

.edit-field-group input,
.edit-field-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

/* Modal Colour Picker Styles */
.modal-colour-picker {
    margin-bottom: 25px;
}

.modal-colour-picker label {
    font-size: 16px !important;
    font-weight: 600;
    margin-bottom: 8px;
}

.modal-colour-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 14px;
}

.modal-colour-grid {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 10px;
    background: #fafafa;
    max-height: 300px;
    overflow-y: auto;
}

/* Modal Glazing Features Picker */
.modal-glazing-features-picker {
    margin-bottom: 25px;
}

.modal-glazing-features-picker label {
    font-size: 16px !important;
    font-weight: 600;
    margin-bottom: 8px;
}

.modal-glazing-features-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 14px;
}

.modal-glazing-features-grid {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 10px;
    background: #fafafa;
}

#edit-item-content:has(.modal-glazing-features-picker) {
    max-height: 600px;
    overflow-y: auto;
}

/* Modal Glazing Type Picker */
.modal-glazing-type-picker {
    margin-bottom: 25px;
}

.modal-glazing-type-picker label {
    font-size: 16px !important;
    font-weight: 600;
    margin-bottom: 8px;
}

.modal-glazing-type-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 15px;
    background: #fafafa;
    margin-bottom: 15px;
}

.glazing-type-selection-display {
    margin-bottom: 10px;
    font-size: 14px;
}

.glazing-type-selection-display strong {
    color: var(--primary-color);
}

/* Modal Glazing Pattern Picker */
.modal-glazing-pattern-picker {
    margin-bottom: 25px;
}

.modal-glazing-pattern-picker label {
    font-size: 16px !important;
    font-weight: 600;
    margin-bottom: 8px;
}

.modal-glazing-pattern-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 10px;
    background: #fafafa;
}

#edit-item-content:has(.modal-glazing-type-picker) {
    max-height: 500px;
    overflow-y: auto;
}

/* Modal Opening Picker */
.modal-opening-picker {
    margin-bottom: 25px;
}

.modal-opening-picker label {
    font-size: 16px !important;
    font-weight: 600;
    margin-bottom: 8px;
}

.modal-opening-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 15px;
    background: #fafafa;
    margin-top: 10px;
}

.modal-opening-grid .opening-card {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    background: #fff;
    transition: all 0.2s ease;
}

.modal-opening-grid .opening-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.15);
}

.modal-opening-grid .opening-card.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.modal-opening-grid .opening-card img {
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
    margin-bottom: 10px;
}

.modal-opening-grid .opening-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.opening-selection-display {
    margin-bottom: 5px;
    font-size: 14px;
}

.opening-selection-display strong {
    color: var(--primary-color);
}

/* ====================================
   Responsive Design
   ==================================== */

/* Tablets */
@media (max-width: 992px) {
    .configuration-container {
        grid-template-columns: 1fr;
    }

    .configuration-preview {
        position: static;
    }

    .review-container {
        grid-template-columns: 1fr;
    }

    .customer-details-form {
        grid-template-columns: 1fr;
        column-gap: 0;
    }

    .order-summary {
        position: static;
    }

    .basket-item {
        grid-template-columns: 1fr;
    }

    .item-thumbnail {
        margin: 0 auto;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .quotation-form-container {
        padding: 0px;
    }

    .multi-step-form {
        padding: 20px;
    }

    .progress-indicator {
        padding: 0;
        margin-bottom: 30px;
    }

    .progress-step .step-number {
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: 16px;
    }

    .progress-step .step-title {
        font-size: 10px;
    }

    .category-grid,
    .type-grid,
    .material-grid {
        grid-template-columns: 1fr;
    }

    .style-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }

    .form-step h2 {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .configuration-actions,
    .basket-actions {
        flex-direction: column;
    }

    .form-navigation {
        flex-direction: column;
    }

    .colour-items {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .glazing-feature-items {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .item-actions {
        flex-direction: row;
    }

    .modal-content {
        padding: 20px;
    }

    /* Fix input fields on mobile - prevent zoom and overflow */
    .form-group input[type="number"],
    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="tel"],
    .form-group input[type="file"],
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevent iOS auto-zoom */
        padding: 12px;
    }

    /* File inputs need special handling on mobile */
    .form-group input[type="file"] {
        padding: 8px;
        font-size: 14px;
    }

    .form-group label {
        font-size: 14px;
    }

    .field-hint {
        font-size: 11px;
    }

    /* Fix glazing grids on mobile */
    .glazing-type-grid,
    .modal-glazing-type-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .glazing-pattern-grid,
    .modal-glazing-pattern-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    .quotation-subheading {
       font-size: 16px !important;
   }
   .category-grid .image-card .card-image {
       height: 175px;
   }
   .material-grid .image-card .card-image {
       height: 175px;
   }
   .progress-step[data-step="basket"] .step-number svg {
       margin-top: 10px;
   }
   .aluminium-type-grid {
       grid-template-columns: repeat(1, 1fr);
   }
   .aluminium-type-card h4 {
       font-size: 16px !important;
   }
}

/* Small Mobile */
@media (max-width: 480px) {
    .progress-indicator {
        flex-wrap: wrap;
    }

    .progress-step {
        margin-bottom: 20px;
    }

    .progress-indicator::before {
        display: none;
    }

    .item-summary td:first-child {
        width: 120px;
        font-size: 13px;
    }

    .item-summary td {
        font-size: 13px;
    }
}

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

.text-muted {
    color: var(--text-muted);
}

.mt-10 {
    margin-top: 10px;
}

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

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* ====================================
   Print Styles (Optional)
   ==================================== */
@media print {
    .progress-indicator,
    .form-navigation,
    .btn,
    .configuration-actions,
    .basket-actions,
    .item-actions {
        display: none;
    }

    .form-step {
        display: block !important;
    }

    .quotation-form-container {
        box-shadow: none;
    }
}
