/* Clean Black & White Service Cost Calculator */
* {
    box-sizing: border-box;
}

.scc-calculator {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    color: #333333;
    line-height: 1.6;
}

/* Header Section */
.scc-service-info {
    padding: 30px 40px;
    text-align: left;
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
}
/* Make the checkbox bigger */
.scc-checkbox-label input[type="checkbox"].scc-parameter-input {
    width: 20px;
    height: 20px;
    transform: scale(1.3); /* optional if width/height doesn't scale properly */
    margin-right: 8px; /* spacing between checkbox and label text */
  }
  
  /* Add padding to the span that contains the label text and price */
  .scc-checkbox-label .scc-checkbox-text {
    padding: 4px 8px;
    display: inline-block;
  }
  
.scc-service-name {
    margin: 0 0 16px;
    font-size: 2rem;
    font-weight: 700;
    color: #333333;
    letter-spacing: -0.02em;
}

.scc-service-description {
    color: #666666;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* Main Content */
.scc-calculator-content {
    padding: 40px;
}

/* Messages */
.scc-message {
    margin-bottom: 24px;
    padding: 12px 16px;
    border-radius: 4px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    border-left: 4px solid;
}

.scc-message-success {
    background: #f8f9fa;
    border-color: #333333;
    color: #333333;
}

.scc-message-error {
    background: #f8f9fa;
    border-color: #666666;
    color: #333333;
}

/* Message Container Accessibility Improvements */
.scc-message-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.scc-message-text {
    flex: 1;
    line-height: 1.5;
}

.scc-message-dismiss {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: inherit;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.scc-message-dismiss:hover,
.scc-message-dismiss:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Success message styling */
.scc-success .scc-message-dismiss {
    border-color: rgba(0, 100, 0, 0.3);
    color: #006400;
}

.scc-success .scc-message-dismiss:hover,
.scc-success .scc-message-dismiss:focus {
    background: rgba(0, 100, 0, 0.1);
    border-color: rgba(0, 100, 0, 0.5);
    outline-color: rgba(0, 100, 0, 0.5);
}

/* Error message styling */
.scc-error .scc-message-dismiss {
    border-color: rgba(200, 0, 0, 0.3);
    color: #cc0000;
}

.scc-error .scc-message-dismiss:hover,
.scc-error .scc-message-dismiss:focus {
    background: rgba(200, 0, 0, 0.1);
    border-color: rgba(200, 0, 0, 0.5);
    outline-color: rgba(200, 0, 0, 0.5);
}

/* Make message containers focusable for accessibility */
.scc-email-message,
.scc-quote-message {
    outline: none;
    position: relative;
}

.scc-email-message:focus,
.scc-quote-message:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Enhanced message visibility */
.scc-message {
    padding: 16px 20px;
    margin: 16px 0;
    border-radius: 6px;
    font-weight: 500;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.scc-email-message,
.scc-quote-message {
    margin-top: 20px;
    margin-bottom: 0;
}

/* Parameter Groups - Row Layout */
.scc-parameters {
    margin-bottom: 40px;
}

.scc-parameter-group {
    margin-bottom: 40px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 24px;
}

.scc-parameter-label {
    font-size: 18px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 20px;
    display: block;
    text-align: left;
}

.scc-parameter-description {
    color: #666666;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
    text-align: left;
}

/* Sub-parameters in rows */
.scc-subparameters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

/* 1. Ensure row-gap is enough to separate legend/desc from inputs */
.scc-parameter-group.scc-subparameters {
  /* (re-)declare grid so you pick up these new rules) */
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;        /* space both rows & columns */
  row-gap: 32px;    /* extra vertical breathing room */
}

/* 2. Force legend and description to span every column */
.scc-parameter-group.scc-subparameters > legend,
.scc-parameter-group.scc-subparameters > .scc-parameter-description {
  grid-column: 1 / -1;     /* start at col-1, end at last col */
  margin-bottom: 0;        /* let the grid's row-gap handle spacing */
}

/* 3. (Optional) Tweak the subparameter rows if you need different vertical spacing */
.scc-parameter-group.scc-subparameters .scc-subparameter-row {
  margin-top: 0;           /* remove any extra top margin */
}

.scc-subparameter-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scc-subparameter-label {
    font-weight: 500;
    color: #333333;
    font-size: 15px;
    text-align: left;
}

.scc-subparameter-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.2s ease;
    background: #ffffff;
    color: #333333;
}

.scc-subparameter-input:focus {
    outline: none;
    border-color: #333333;
}

/* Single Input Fields (for simple parameters) */
.scc-input-field {
    margin-bottom: 24px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 24px;
}

.scc-input-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 16px;
    color: #333333;
    text-align: left;
}

.scc-field-description {
    color: #666666;
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.5;
    text-align: left;
}

.scc-field-price {
    color: #333333;
    font-size: 14px;
    margin-top: 8px;
    font-weight: 500;
    text-align: left;
}

/* Form Inputs */
.scc-calculator input[type="text"],
.scc-calculator input[type="number"],
.scc-calculator input[type="email"],
.scc-calculator input[type="tel"],
.scc-calculator select,
.scc-calculator textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.2s ease;
    background: #ffffff;
    color: #333333;
    font-family: inherit;
}

.scc-calculator input:focus,
.scc-calculator select:focus,
.scc-calculator textarea:focus {
    outline: none;
    border-color: #333333;
}

/* Radio and Checkbox Options */
.scc-radio-options {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.scc-radio-option {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.scc-radio-option:hover {
    border-color: #333333;
    background: #ffffff;
}

.scc-radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #333333;
    margin: 0;
}

.scc-radio-option label {
    margin: 0;
    cursor: pointer;
    color: #333333;
    font-weight: 500;
}

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

/* Calculate Button */
.scc-calculate-section {
    text-align: left;
    margin: 40px 0;
    padding: 24px 0;
    border-top: 1px solid #e0e0e0;
}

.scc-calculate-btn {
    background: #333333;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: none;
}

.scc-calculate-btn:hover {
    background: #000000;
}

.scc-calculate-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

/* Promo Code Section */
.scc-promo-section {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 24px;
    margin: 32px 0;
}

.scc-promo-section h4 {
    margin: 0 0 16px;
    font-size: 16px;
    color: #333333;
    font-weight: 600;
    text-align: left;
}

.scc-promo-form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.scc-promo-code {
    flex: 1;
    max-width: 300px;
}

.scc-apply-promo {
    background: #333333;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 12px 24px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.scc-apply-promo:hover {
    background: #000000;
}

.scc-promo-message {
    margin-top: 12px;
    font-weight: 500;
    padding: 10px;
    border-radius: 4px;
}

/* Results Section */
.scc-result-container {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 32px;
    margin-top: 32px;
}

.scc-result-container h4 {
    margin: 0 0 24px;
    font-size: 20px;
    color: #333333;
    text-align: left;
    font-weight: 700;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 12px;
}

.scc-result {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 32px;
    align-items: start;
}

/* Result Container Heading */
.scc-result-container h3 {
    margin: 0 0 20px;
    font-size: 20px;
    color: #333333;
    font-weight: 700;
    text-align: left;
}

/* Itemized List */
.scc-itemized h4 {
    margin: 0 0 16px;
    font-size: 16px;
    color: #333333;
    font-weight: 600;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 8px;
}

/* Enhanced Itemized List Styling */
.scc-itemized-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.scc-itemized-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    line-height: 1.4;
    transition: background-color 0.2s ease;
}

.scc-itemized-item:last-child {
    border-bottom: none;
}

.scc-itemized-item:hover {
    background-color: #f8f9fa;
}

.scc-item-description {
    flex: 1;
    color: #333333;
    font-weight: 500;
    margin-right: 16px;
    word-wrap: break-word;
    line-height: 1.4;
}

.scc-item-calculation {
    color: #666666;
    font-size: 12px;
    margin: 0 12px;
    white-space: nowrap;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

.scc-item-total {
    color: #333333;
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    text-align: right;
    min-width: 80px;
}

/* Special styling for percentage items */
.scc-itemized-item .scc-item-description[data-type="percentage"],
.scc-itemized-item:has(.scc-item-description:contains('+')):not(:has(.scc-item-calculation)) {
    background-color: #f0f8ff;
    border-left: 3px solid #0066cc;
    margin: -12px -16px -12px -13px;
    padding: 12px 16px 12px 13px;
}

.scc-itemized-item .scc-item-description:contains('+') {
    color: #0066cc;
    font-weight: 600;
}

/* Summary */
.scc-summary {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 20px;
    height: fit-content;
}

.scc-summary h5 {
    margin: 0 0 16px;
    font-size: 16px;
    color: #333333;
    font-weight: 600;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 8px;
}

.scc-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.scc-summary-row:last-child {
    border-bottom: none;
}

/* Special styling for percentage additions row */
.scc-percentage-row {
    background: #f8f9fa;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0 !important;
}

.scc-percentage-row .scc-summary-label {
    color: #333333;
    font-weight: 500;
}

.scc-percentage-row .scc-summary-value {
    color: #333333;
    font-weight: 600;
}

.scc-summary-label {
    font-weight: 500;
    color: #333333;
    text-align: left;
}

.scc-summary-value {
    font-weight: 600;
    color: #333333;
    text-align: right;
}

.scc-total-row {
    background: #f8f9fa;
    margin-top: 12px;
    padding: 12px 0;
    border-top: 2px solid #333333;
}

.scc-total-row .scc-summary-label,
.scc-total-row .scc-summary-value {
    font-weight: 700;
    color: #333333;
}

/* Action Buttons */
.scc-actions {
    grid-column: span 2;
    margin-top: 32px;
    display: flex;
    gap: 16px;
    justify-content: flex-start;
}

.scc-email-estimate,
.scc-request-quote {
    padding: 12px 24px;
    border-radius: 4px;
    border: 2px solid #333333;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    background: #ffffff;
    color: #333333;
}

.scc-email-estimate:hover,
.scc-request-quote:hover {
    background: #333333;
    color: #ffffff;
}

/* Forms */
.scc-email-form,
.scc-quote-form {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 32px;
    margin-top: 24px;
}

.scc-form-heading {
    margin: 0 0 8px;
    font-size: 20px;
    color: #333333;
    font-weight: 700;
    text-align: left;
}

.scc-form-description {
    text-align: left;
    color: #666666;
    margin-bottom: 32px;
    font-size: 14px;
}

.scc-form-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e0e0e0;
}

.scc-form-section:last-of-type {
    border-bottom: none;
}

.scc-form-section h4 {
    margin: 0 0 20px;
    font-size: 16px;
    color: #333333;
    font-weight: 600;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 8px;
}

.scc-form-field {
    margin-bottom: 20px;
}

.scc-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333333;
    font-size: 14px;
    text-align: left;
}

.scc-field-hint {
    display: block;
    margin-top: 6px;
    color: #666666;
    font-size: 12px;
    text-align: left;
}

.required {
    color: #666666;
    margin-left: 4px;
}

.scc-checkbox-field {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.scc-checkbox-field input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #333333;
    margin: 2px 0 0 0;
}

.scc-checkbox-field label {
    margin: 0;
    font-weight: 500;
    cursor: pointer;
    color: #333333;
    text-align: left;
}

/* Form Buttons */
.scc-form-submit-row {
    display: flex;
    gap: 16px;
    justify-content: flex-start;
    align-items: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
}

.scc-email-submit,
.scc-quote-submit {
    background: #333333;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.scc-form-cancel {
    background: #ffffff;
    color: #333333;
    border: 2px solid #333333;
    border-radius: 4px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.scc-email-submit:hover,
.scc-quote-submit:hover {
    background: #000000;
}

.scc-form-cancel:hover {
    background: #333333;
    color: #ffffff;
}

/* Loading Spinner */
.scc-loading-spinner {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #333333;
    font-weight: 500;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e0e0e0;
    border-top: 2px solid #333333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Screen Reader Only Content */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.sr-only-focusable:focus {
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding: inherit !important;
    margin: inherit !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: inherit !important;
}


.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.scc-section-parameter-legend,
.scc-radio-legend {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .scc-calculator-content {
        padding: 24px;
    }

    .scc-service-info {
        padding: 24px;
    }

    .scc-service-name {
        font-size: 1.5rem;
    }

    .scc-subparameters {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .scc-result {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .scc-actions {
        flex-direction: column;
        gap: 12px;
    }

    .scc-email-estimate,
    .scc-request-quote {
        width: 100%;
        text-align: center;
    }

    .scc-promo-form {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .scc-promo-code {
        max-width: 100%;
    }

    .scc-apply-promo {
        width: 100%;
    }

    .scc-form-submit-row {
        flex-direction: column;
        gap: 12px;
    }

    .scc-email-submit,
    .scc-quote-submit,
    .scc-form-cancel {
        width: 100%;
    }

    .scc-itemized-item {
        flex-direction: column;
        gap: 6px;
        padding: 14px 16px;
        font-size: 12px;
    }
    
    .scc-item-description {
        margin-right: 0;
        margin-bottom: 4px;
    }
    
    .scc-item-calculation {
        margin: 0;
        font-size: 11px;
        color: #888888;
    }
    
    .scc-item-total {
        text-align: left;
        font-size: 14px;
        font-weight: 700;
        color: #333333;
        min-width: auto;
    }
    
    /* Summary Mobile Styles */
    .scc-summary {
        padding: 16px;
        margin-top: 20px;
    }
    
    .scc-summary h5 {
        font-size: 16px;
        margin-bottom: 16px;
    }
    
    .scc-summary-row {
        padding: 8px 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .scc-percentage-row {
        padding: 8px 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .scc-percentage-row .scc-summary-value {
        align-self: flex-end;
    }
    
    .scc-total-row {
        margin-top: 12px;
        padding: 10px 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .scc-total-row .scc-summary-value {
        align-self: flex-end;
    }
    
    .scc-summary-value {
        font-weight: 600;
        align-self: flex-end;
    }
}