/**
 * Push Logic Pricing Calculator - Frontend Styles
 */

/* Login required message */
.plpc-login-required {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 1.5rem 2rem;
    margin: 2rem auto;
    text-align: center;
}

.plpc-login-required p {
    margin: 0;
    color: #856404;
    font-size: 1rem;
}

.plpc-login-required a {
    color: #0056b3;
    font-weight: 600;
    text-decoration: underline;
}

.plpc-login-required a:hover {
    color: #003d7a;
}

.plpc-calculator-wrapper {
    margin: 2rem auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.plpc-calculator {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.plpc-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    color: #333;
    border-bottom: 2px solid #000000;
    padding-bottom: 0.5rem;
}

.plpc-loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.plpc-loading p {
    margin: 0;
    font-size: 1rem;
}

.plpc-error-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.plpc-error-message .plpc-error {
    color: #155724;
    margin: 0;
}

/* Fallback/Parent Product Notice */
.plpc-fallback-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: #856404;
    font-size: 0.9rem;
    line-height: 1.5;
}

.plpc-fallback-notice strong {
    color: #664d03;
}

/* Debug Output */
.plpc-debug-output {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.plpc-debug-output details {
    margin: 0;
}

.plpc-debug-output summary {
    background: #2d2d2d;
    color: #4ec9b0;
    padding: 0.75rem 1rem;
    cursor: pointer;
    user-select: none;
    border-bottom: 1px solid #333;
}

.plpc-debug-output summary:hover {
    background: #383838;
}

.plpc-debug-output .plpc-debug-json {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1rem;
    margin: 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 0.8rem;
    line-height: 1.4;
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre;
}

.plpc-product-info {
    background: #f7f7f7;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.plpc-product-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: #333;
}

.plpc-product-code {
    font-size: 0.875rem;
    color: #666;
    margin: 0;
}

.plpc-available-options {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e0e0e0;
}

.plpc-available-materials,
.plpc-available-prints,
.plpc-available-sides {
    font-size: 0.875rem;
    color: #555;
    margin: 0.5rem 0;
    line-height: 1.5;
}

.plpc-available-materials strong,
.plpc-available-prints strong,
.plpc-available-sides strong {
    color: #333;
    display: block;
    margin-bottom: 0.25rem;
}

.plpc-materials-list,
.plpc-prints-list,
.plpc-sides-list {
    color: #000;
}

.plpc-form-group {
    margin-bottom: 1.5rem;
}

.plpc-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 0.95rem;
}

.plpc-print-option-display {
    display: inline-block;
    padding: 0.75rem;
    font-size: 1rem;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    font-weight: 500;
}

.plpc-fixture-select,
.plpc-material-select,
.plpc-print-option-select,
.plpc-print-sides-select,
.plpc-carriage-select,
.plpc-quantity-input {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    transition: border-color 0.2s;
}

.plpc-fixture-select:focus,
.plpc-material-select:focus,
.plpc-print-option-select:focus,
.plpc-print-sides-select:focus,
.plpc-carriage-select:focus,
.plpc-quantity-input:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.plpc-fixture-select:disabled,
.plpc-material-select:disabled,
.plpc-print-option-select:disabled,
.plpc-print-sides-select:disabled,
.plpc-carriage-select:disabled,
.plpc-quantity-input:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

/* Fixture Group Styling */
.plpc-fixture-group {
    background: #f0f7fc;
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid #d0e3f0;
    margin-bottom: 1.5rem;
}

.plpc-fixture-group label {
    color: #0073aa;
}

.plpc-field-hint {
    font-size: 0.85rem;
    color: #666;
    margin: 0.5rem 0 0 0;
    font-style: italic;
}

/* Quantity Slider Styles */
.plpc-quantity-group {
    margin-bottom: 2rem;
}

.plpc-slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.plpc-slider-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-top: 8px; /* Align slider thumb center with value box */
}

.plpc-quantity-slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

.plpc-quantity-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: #000000;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 2px 6px rgba(0, 115, 170, 0.3);
}

.plpc-quantity-slider::-webkit-slider-thumb:hover {
    background: #000000;
    transform: scale(1.1);
}

.plpc-quantity-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: #000000;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 2px 6px rgba(0, 115, 170, 0.3);
}

.plpc-quantity-slider::-moz-range-thumb:hover {
    background: #000000;
    transform: scale(1.1);
}

.plpc-quantity-slider:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.plpc-quantity-slider:disabled::-webkit-slider-thumb {
    background: #999;
    cursor: not-allowed;
}

.plpc-quantity-slider:disabled::-moz-range-thumb {
    background: #999;
    cursor: not-allowed;
}

.plpc-slider-value {
    width: 130px;
    flex-shrink: 0;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    background: #f0f7fc;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    border: 1px solid #000000;
}

.plpc-quantity-display {
    color: #000000;
    font-size: 1.25rem;
}

/* Higher Quantity Notice */
.plpc-higher-quantity-notice {
    background: #e8f4fd;
    border: 1px solid #b8daff;
    border-left: 4px solid #007bff;
    border-radius: 4px;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #004085;
}

.plpc-higher-quantity-notice p {
    margin: 0;
}

.plpc-higher-quantity-notice .plpc-quote-link {
    color: #004085;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.plpc-higher-quantity-notice .plpc-quote-link:hover {
    color: #002752;
}

.plpc-quantity-labels {
    position: relative;
    height: 24px;
    margin-top: 0.5rem;
    width: calc(100% - 32px); /* Account for thumb width + padding */
    margin-left: 16px; /* Half of total offset */
}

.plpc-quantity-label {
    position: absolute;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: #666;
    white-space: nowrap;
}

.plpc-calculate-btn-wrapper {
    margin: 2rem 0;
    text-align: center;
}

.plpc-calculate-btn {
    background: #000000;
    color: #fff;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.plpc-calculate-btn:hover:not(:disabled) {
    background: #000000;
}

.plpc-calculate-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.plpc-results {
    background: #f9f9f9;
    border: 2px solid #000000;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.plpc-results h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: #333;
}

.plpc-results h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem 0;
    color: #333;
    border-top: 1px solid #ddd;
    padding-top: 1rem;
}

.plpc-result-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.plpc-result-row:last-child {
    border-bottom: none;
}

.plpc-result-lead-time-row {
    background: #e8f5e9;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    border: 1px solid #c8e6c9;
}

.plpc-result-lead-time-row .plpc-result-label {
    color: #2e7d32;
}

.plpc-result-lead-time-row .plpc-result-value {
    color: #1b5e20;
    font-weight: 700;
}

.plpc-result-label {
    font-weight: 500;
    color: #666;
}

.plpc-result-value {
    font-weight: 600;
    color: #333;
}

.plpc-total-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0 0.5rem 0;
    margin-top: 1rem;
    border-top: 2px solid #000000;
    font-size: 1.25rem;
}

.plpc-total-row .plpc-result-label,
.plpc-total-row .plpc-result-value {
    font-weight: 700;
    color: #000000;
}

.plpc-carriage-section {
    margin-top: 1rem;
}

.plpc-disclaimer {
    margin: 1.5rem 0 0 0;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
    color: #666;
    font-size: 0.875rem;
    line-height: 1.4;
}

.plpc-disclaimer small {
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .plpc-calculator-wrapper {
        margin: 1rem;
    }
    
    .plpc-calculator {
        padding: 1.5rem;
    }
    
    .plpc-title {
        font-size: 1.5rem;
    }
    
    .plpc-calculate-btn {
        width: 100%;
        padding: 0.875rem 1.5rem;
    }
    
    .plpc-result-row {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .plpc-result-value {
        text-align: left;
    }
}

/* Loading Animation */
@keyframes plpcPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.plpc-loading {
    animation: plpcPulse 1.5s ease-in-out infinite;
}

.accordion-item.pricing {display:none;}