/**
 * Container Shortening Calculator - Styles
 * Interactive container length calculator with industrial aesthetic
 */

/* ===========================
   Section Base Styles
   =========================== */

.container-shortening-section {
    padding: 80px 20px;
    background: #f9fafb;
}

.shortening-card {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 48px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

/* ===========================
   Section Header
   =========================== */

.section-head {
    text-align: center;
    margin-bottom: 48px;
}

.section-badge {
    display: inline-block;
    background: #F59E0B;
    color: #0f172a;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.section-title {
    font-size: 42px;
    font-weight: 900;
    color: #1f2937;
    margin: 0 0 12px 0;
    letter-spacing: -0.5px;
}

.section-subtitle {
    font-size: 18px;
    color: #6b7280;
    margin: 0 0 24px 0;
    font-weight: 400;
}

.trust-signals {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 24px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #374151;
    font-weight: 600;
}

.trust-item svg {
    flex-shrink: 0;
}

/* ===========================
   Container Type Selector
   =========================== */

.container-type-selector {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.type-pill {
    padding: 14px 28px;
    border: 2px solid #e5e7eb;
    background: white;
    color: #374151;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.type-pill:hover {
    border-color: #F59E0B;
    background: #fffbeb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

.type-pill.active {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: white;
    border-color: #F59E0B;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
}

.type-pill:focus {
    outline: 2px solid #F59E0B;
    outline-offset: 2px;
}

/* ===========================
   Container Visual
   =========================== */

.container-visual-wrapper {
    margin: 40px 0;
    padding: 20px;
    background: #f9fafb;
    border-radius: 16px;
}

.measurement-ruler {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 0 10px;
}

.ruler-tick {
    position: relative;
    text-align: center;
}

.ruler-tick span {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    display: block;
    margin-bottom: 4px;
}

.ruler-tick::after {
    content: '';
    display: block;
    width: 2px;
    height: 12px;
    background: #d1d5db;
    margin: 0 auto;
}

.container-body {
    display: flex;
    height: 180px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* Active Container Section */
.container-section-active {
    position: relative;
    flex: 100;
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    border-right: 4px solid #b45309;
    transition: flex 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.container-section-active .container-corrugation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 20px,
        rgba(0, 0, 0, 0.15) 20px,
        rgba(0, 0, 0, 0.15) 22px
    );
    pointer-events: none;
}

/* Cut Section */
.container-section-cut {
    position: relative;
    flex: 0;
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    opacity: 0.6;
    transition: flex 0.3s ease, opacity 0.3s ease;
}

.container-section-cut .container-corrugation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 20px,
        rgba(0, 0, 0, 0.1) 20px,
        rgba(0, 0, 0, 0.1) 22px
    );
    pointer-events: none;
}

.cut-indicator {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.container-section-cut[style*="flex: 0"] .cut-indicator {
    opacity: 0;
}

.container-section-cut:not([style*="flex: 0"]) .cut-indicator {
    opacity: 1;
}

/* Container Details */
.container-corner {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #1f2937;
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.container-corner.tl {
    top: 10px;
    left: 10px;
}

.container-corner.tr {
    top: 10px;
    right: 10px;
}

.container-corner.bl {
    bottom: 10px;
    left: 10px;
}

.container-corner.br {
    bottom: 10px;
    right: 10px;
}

.container-door {
    position: absolute;
    right: 20px;
    top: 30px;
    bottom: 30px;
    width: 50px;
    border: 3px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.door-handle {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 25px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.door-detail {
    position: absolute;
    left: 8px;
    right: 8px;
    height: 2px;
    background: rgba(0, 0, 0, 0.15);
}

.door-detail-1 {
    top: 15%;
}

.door-detail-2 {
    bottom: 15%;
}

/* ===========================
   Length Control
   =========================== */

.length-control-wrapper {
    margin: 40px 0;
}

.control-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 15px;
    font-weight: 600;
    color: #374151;
}

.custom-input-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.custom-length-input {
    width: 100px;
    padding: 8px 32px 8px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
    color: #F59E0B;
    background: white;
    transition: all 0.3s ease;
    text-align: right;
}

.custom-length-input:focus {
    outline: none;
    border-color: #F59E0B;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.custom-length-input:hover {
    border-color: #F59E0B;
}

.input-unit {
    position: absolute;
    right: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    pointer-events: none;
}

/* Remove spinner arrows from number input */
.custom-length-input::-webkit-outer-spin-button,
.custom-length-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.custom-length-input[type=number] {
    -moz-appearance: textfield;
}

.current-value {
    font-size: 20px;
    font-weight: 800;
    color: #F59E0B;
}

.quick-presets {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.preset-label {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
}

.preset-btn {
    padding: 8px 20px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preset-btn:hover {
    border-color: #F59E0B;
    background: #fffbeb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

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

.length-control {
    display: flex;
    align-items: center;
    gap: 16px;
}

.length-btn {
    width: 44px;
    height: 44px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.length-btn svg {
    color: #374151;
    transition: color 0.3s ease;
}

.length-btn:hover {
    border-color: #F59E0B;
    background: #fffbeb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.length-btn:hover svg {
    color: #F59E0B;
}

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

.length-btn:focus {
    outline: 2px solid #F59E0B;
    outline-offset: 2px;
}

.slider-wrapper {
    flex: 1;
    position: relative;
    height: 44px;
    display: flex;
    align-items: center;
}

/* Custom Slider Styling */
.custom-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 10px;
    outline: none;
    position: relative;
    z-index: 2;
    cursor: pointer;
}

/* Slider Track Fill */
.slider-track-fill {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 8px;
    background: linear-gradient(90deg, #F59E0B 0%, #D97706 100%);
    border-radius: 10px;
    pointer-events: none;
    z-index: 1;
    transition: width 0.1s ease;
}

/* Slider Thumb - WebKit */
.custom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    border-radius: 50%;
    cursor: grab;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
    transition: all 0.2s ease;
}

.custom-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.5);
}

.custom-slider::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.05);
}

/* Slider Thumb - Firefox */
.custom-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    border: none;
    border-radius: 50%;
    cursor: grab;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
    transition: all 0.2s ease;
}

.custom-slider::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.5);
}

.custom-slider::-moz-range-thumb:active {
    cursor: grabbing;
    transform: scale(1.05);
}

.custom-slider:focus {
    outline: none;
}

.custom-slider:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2);
}

.custom-slider:focus::-moz-range-thumb {
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2);
}

/* ===========================
   Price Estimation Card
   =========================== */

.price-estimation-card {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    border-radius: 16px;
    padding: 24px;
    margin: 32px 0;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3);
}

.price-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
}

.price-card-header svg {
    flex-shrink: 0;
}

.price-display {
    text-align: center;
    margin-bottom: 20px;
}

.price-amount {
    font-size: 42px;
    font-weight: 900;
    color: white;
    margin-bottom: 4px;
    letter-spacing: -1px;
}

.price-note {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

.price-breakdown {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 16px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    color: white;
    font-size: 14px;
}

.breakdown-item:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.breakdown-item.highlight {
    font-weight: 700;
    font-size: 15px;
    padding-top: 12px;
}

.breakdown-item .savings {
    color: #dcfce7;
    font-weight: 800;
}

/* ===========================
   Dimension Specs Cards
   =========================== */

.dimension-specs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 40px 0;
}

.spec-card {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.spec-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: transparent;
    border-radius: 16px 16px 0 0;
    transition: background 0.3s ease;
}

.spec-card.active::before {
    background: linear-gradient(90deg, #F59E0B 0%, #D97706 100%);
}

.spec-card:hover {
    border-color: #d1d5db;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.spec-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    border-radius: 12px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.spec-icon.orange {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: white;
}

.spec-label {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.spec-value-large {
    font-size: 32px;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.spec-value-large.orange {
    color: #F59E0B;
}

.spec-sub {
    font-size: 14px;
    color: #9ca3af;
    margin-bottom: 8px;
    font-weight: 500;
}

.spec-type,
.spec-detail {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
}

/* ===========================
   Call to Action
   =========================== */

.shortening-cta {
    text-align: center;
    margin-top: 48px;
    padding-top: 40px;
    border-top: 2px solid #e5e7eb;
}

.cta-description {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 24px;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-quote-shortening {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.btn-quote-shortening svg {
    flex-shrink: 0;
}

.btn-quote-shortening:hover {
    background: linear-gradient(135deg, #D97706 0%, #b45309 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(245, 158, 11, 0.4);
}

.btn-quote-shortening:active {
    transform: translateY(0);
}

.btn-quote-shortening:focus {
    outline: 2px solid #F59E0B;
    outline-offset: 4px;
}

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

@media (max-width: 900px) {
    .section-title {
        font-size: 36px;
    }

    .shortening-card {
        padding: 32px 24px;
    }

    .dimension-specs {
        grid-template-columns: repeat(2, 1fr);
    }

    .container-body {
        height: 150px;
    }
}

@media (max-width: 768px) {
    .container-shortening-section {
        padding: 60px 16px;
    }

    .shortening-card {
        padding: 28px 20px;
        border-radius: 16px;
    }

    .section-title {
        font-size: 28px;
    }

    .section-subtitle {
        font-size: 16px;
    }

    .container-type-selector {
        flex-direction: column;
    }

    .type-pill {
        width: 100%;
        text-align: center;
    }

    .control-label {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .custom-input-wrapper {
        width: 100%;
    }

    .custom-length-input {
        width: 100%;
    }

    .dimension-specs {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .container-body {
        height: 120px;
    }

    .container-visual-wrapper {
        padding: 16px;
    }

    .measurement-ruler {
        font-size: 10px;
    }

    .ruler-tick::after {
        height: 8px;
    }

    .spec-value-large {
        font-size: 28px;
    }

    .btn-quote-shortening {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 24px;
    }

    .container-body {
        height: 100px;
    }

    .container-door {
        width: 30px;
        right: 10px;
        top: 20px;
        bottom: 20px;
    }

    .door-handle {
        width: 4px;
        height: 15px;
    }

    .length-btn {
        width: 40px;
        height: 40px;
    }
}

/* ===========================
   Accessibility
   =========================== */

@media (prefers-reduced-motion: reduce) {
    .container-section-active,
    .container-section-cut,
    .spec-card,
    .type-pill,
    .btn-quote-shortening,
    .length-btn,
    .custom-slider::-webkit-slider-thumb,
    .custom-slider::-moz-range-thumb {
        transition: none !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .type-pill,
    .spec-card,
    .length-btn {
        border-width: 3px;
    }

    .container-section-active {
        border-right-width: 6px;
    }
}
