/* ==========================================================================
   Vinyl Pricing Calculator - Front-end Styles
   ========================================================================== */

.vinyl-calc {
    max-width: 600px;
    margin: 24px 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.vinyl-calc__header {
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.vinyl-calc__title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1a1a2e;
}

.vinyl-calc__body {
    padding: 20px;
}

.vinyl-calc__section {
    margin-bottom: 20px;
}

.vinyl-calc__label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.vinyl-calc__optional {
    font-weight: 400;
    text-transform: none;
    color: #888;
    font-size: 12px;
}

/* Dimensions */
.vinyl-calc__dimensions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vinyl-calc__dim-field {
    display: flex;
    align-items: center;
    flex: 1;
    border: 1px solid #ccc;
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.vinyl-calc__dim-field:focus-within {
    border-color: #2d5be3;
    box-shadow: 0 0 0 3px rgba(45, 91, 227, 0.1);
}

.vinyl-calc__input {
    border: none;
    padding: 10px 12px;
    font-size: 15px;
    width: 100%;
    outline: none;
    -moz-appearance: textfield;
}

.vinyl-calc__input::-webkit-outer-spin-button,
.vinyl-calc__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.vinyl-calc__unit {
    padding: 10px 12px;
    background: #f5f5f5;
    color: #666;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.vinyl-calc__dim-separator {
    color: #999;
    font-size: 18px;
    padding: 0 4px;
}

.vinyl-calc__dim-hint {
    margin-top: 6px;
    font-size: 11px;
    color: #999;
}

.vinyl-calc__pdf-detect {
    margin-top: 8px;
    padding: 8px 12px;
    background: #f0f4ff;
    border: 1px solid #c7d4f5;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #2d5be3;
}

.vinyl-calc__pdf-detect strong {
    color: #1a1a2e;
}

/* Material Cards */
.vinyl-calc__materials,
.vinyl-calc__laminations {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vinyl-calc__material-option,
.vinyl-calc__lam-option {
    cursor: pointer;
    display: block;
}

.vinyl-calc__material-option input,
.vinyl-calc__lam-option input {
    display: none;
}

.vinyl-calc__material-card,
.vinyl-calc__lam-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.vinyl-calc__material-option input:checked + .vinyl-calc__material-card,
.vinyl-calc__lam-option input:checked + .vinyl-calc__lam-card {
    border-color: #2d5be3;
    background: #f0f4ff;
}

.vinyl-calc__material-card:hover,
.vinyl-calc__lam-card:hover {
    border-color: #aaa;
}

.vinyl-calc__material-name,
.vinyl-calc__lam-name {
    font-weight: 600;
    font-size: 14px;
    color: #1a1a2e;
}

.vinyl-calc__material-price,
.vinyl-calc__lam-price {
    margin-left: auto;
    font-weight: 600;
    font-size: 14px;
    color: #2d5be3;
    white-space: nowrap;
}

.vinyl-calc__material-desc {
    font-size: 12px;
    color: #888;
    display: none;
}

.vinyl-calc__material-option input:checked + .vinyl-calc__material-card .vinyl-calc__material-desc {
    display: inline;
}

/* Quantity */
.vinyl-calc__qty-wrap {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 6px;
    overflow: hidden;
}

.vinyl-calc__qty-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #f5f5f5;
    font-size: 18px;
    cursor: pointer;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.vinyl-calc__qty-btn:hover {
    background: #e0e0e0;
}

.vinyl-calc__input--qty {
    width: 60px;
    text-align: center;
    border: none;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    padding: 8px;
    font-size: 15px;
}

/* Upload Zone */
.vinyl-calc__upload-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    position: relative;
    transition: all 0.2s;
    cursor: pointer;
}

.vinyl-calc__upload-zone:hover,
.vinyl-calc__upload-zone--dragover {
    border-color: #2d5be3;
    background: #f0f4ff;
}

.vinyl-calc__file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.vinyl-calc__upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #888;
    font-size: 14px;
}

.vinyl-calc__upload-placeholder svg {
    stroke: #bbb;
}

.vinyl-calc__upload-formats {
    font-size: 11px;
    color: #aaa;
}

.vinyl-calc__upload-result {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
}

.vinyl-calc__upload-result span {
    font-size: 13px;
}

#vinyl-upload-size {
    color: #999;
    font-size: 12px;
}

.vinyl-calc__upload-remove {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 16px;
    color: #cc0000;
    cursor: pointer;
    padding: 4px 8px;
}

.vinyl-calc__upload-progress {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 12px;
}

.vinyl-calc__progress-bar {
    height: 100%;
    background: #2d5be3;
    width: 0%;
    transition: width 0.3s;
    border-radius: 2px;
}

/* Toggle Switch */
.vinyl-calc__cutting-toggle {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vinyl-calc__toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.vinyl-calc__toggle input {
    display: none;
}

.vinyl-calc__toggle-slider {
    position: relative;
    width: 48px;
    height: 26px;
    background: #ccc;
    border-radius: 13px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.vinyl-calc__toggle-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.vinyl-calc__toggle input:checked + .vinyl-calc__toggle-slider {
    background: #2d5be3;
}

.vinyl-calc__toggle input:checked + .vinyl-calc__toggle-slider::after {
    transform: translateX(22px);
}

.vinyl-calc__toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.vinyl-calc__toggle-price {
    font-size: 13px;
    color: #2d5be3;
    font-weight: 600;
    margin-left: 4px;
}

.vinyl-calc__cutting-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 14px;
    background: #fff8f0;
    border: 1px solid #fde0b0;
    border-radius: 6px;
    font-size: 13px;
    color: #8a5a00;
    line-height: 1.4;
}

.vinyl-calc__cutting-notice svg {
    flex-shrink: 0;
    margin-top: 1px;
}

/* Textarea */
.vinyl-calc__textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.vinyl-calc__textarea:focus {
    border-color: #2d5be3;
    box-shadow: 0 0 0 3px rgba(45, 91, 227, 0.1);
}

/* Price Panel */
.vinyl-calc__price-panel {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.vinyl-calc__price-breakdown {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.vinyl-calc__price-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #666;
}

.vinyl-calc__price-row--unit {
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
    font-weight: 600;
    color: #333;
}

.vinyl-calc__price-row--mincharge {
    color: #e67e22;
    font-style: italic;
    font-size: 12px;
}

.vinyl-calc__total {
    display: flex;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 2px solid #1a1a2e;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
}

/* Button */
.vinyl-calc__btn {
    width: 100%;
    padding: 14px 24px;
    background: #2d5be3;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
}

.vinyl-calc__btn:hover:not(:disabled) {
    background: #1a45c0;
}

.vinyl-calc__btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Error / Success */
.vinyl-calc__error {
    padding: 10px 14px;
    background: #fff0f0;
    border: 1px solid #ffcccc;
    border-radius: 6px;
    color: #cc0000;
    font-size: 13px;
    margin-bottom: 12px;
}

.vinyl-calc__success {
    padding: 12px 16px;
    background: #f0fff4;
    border: 1px solid #c6f6d5;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 14px;
    color: #22543d;
}

.vinyl-calc__success a {
    margin-left: auto;
    color: #2d5be3;
    font-weight: 600;
    text-decoration: none;
}

/* Cart Details */
.vinyl-cart-details {
    margin: 16px 0;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.vinyl-cart-details h4 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
}

.vinyl-cart-item {
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.vinyl-cart-item:last-child {
    border-bottom: none;
}

.vinyl-cart-item__product {
    font-weight: 600;
    margin-bottom: 4px;
}

.vinyl-cart-item__specs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 13px;
    color: #666;
}

/* Responsive */
@media (max-width: 480px) {
    .vinyl-calc__dimensions {
        flex-direction: column;
    }
    .vinyl-calc__dim-separator {
        display: none;
    }
    .vinyl-calc__materials,
    .vinyl-calc__laminations {
        gap: 6px;
    }
    .vinyl-calc__material-card,
    .vinyl-calc__lam-card {
        padding: 10px 12px;
    }
}
