/* Dental Price Calculator Frontend Styles */

.dpc-calculator-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    scroll-behavior: auto; /* Prevent smooth scrolling */
}

/* Prevent smooth scrolling globally for this calculator */
.dpc-calculator-container * {
    scroll-behavior: auto !important;
}

/* Override any global smooth scrolling */
html, body {
    scroll-behavior: auto !important;
}

/* Prevent any smooth scrolling on tooth clicks */
.dpc-tooth {
    scroll-behavior: auto !important;
}

/* Prevent smooth scrolling on all calculator elements */
.dpc-calculator-container,
.dpc-calculator-container *,
.dpc-step-section,
.dpc-teeth-selection,
.dpc-tooth {
    scroll-behavior: auto !important;
}

/* Data Form Styles */
.dpc-data-form {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.dpc-form-description {
    margin: 0 0 20px 0;
    color: #495057;
    font-size: 14px;
}

.dpc-form-group {
    margin-bottom: 20px;
}

.dpc-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #212529;
    font-size: 14px;
}

.dpc-form-group label .required {
    color: #dc3545;
    font-weight: bold;
}

.dpc-form-group input[type="text"],
.dpc-form-group input[type="tel"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ced4da;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.dpc-form-group input[type="text"]:focus,
.dpc-form-group input[type="tel"]:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.dpc-form-group input[type="text"]::placeholder,
.dpc-form-group input[type="tel"]::placeholder {
    color: #adb5bd;
}

.dpc-calculator-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.dpc-calculator-header h2 {
    color: #2c3e50;
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 600;
}

.dpc-calculator-header p {
    color: #7f8c8d;
    font-size: 16px;
    margin: 0;
}

.dpc-calculator-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 30px;
}

/* Step Section Styles */
.dpc-step-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.dpc-step-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.dpc-step-number {
    width: 40px;
    height: 40px;
    background: #007cba;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}

.dpc-step-header h3 {
    color: #2c3e50;
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

/* Category Selection Styles */
.dpc-category-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.dpc-category-option {
    display: block;
    cursor: pointer;
}

.dpc-category-option input[type="radio"] {
    display: none;
}

.dpc-category-card {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    border: 3px solid #dee2e6;
    transition: all 0.3s ease;
    text-align: center;
    height: 100%;
}

.dpc-category-option:hover .dpc-category-card {
    border-color: #007cba;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.15);
    transform: translateY(-2px);
}

.dpc-category-option input[type="radio"]:checked + .dpc-category-card {
    background: #e3f2fd;
    border-color: #007cba;
    box-shadow: 0 4px 16px rgba(0, 124, 186, 0.2);
}

.dpc-category-card h4 {
    color: #007cba;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.dpc-category-card p {
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.dpc-category-card small {
    color: #6c757d;
    font-size: 13px;
    line-height: 1.4;
    display: block;
}

/* Popup/Modal Styles */
.dpc-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.dpc-popup-overlay.dpc-is-visible {
    opacity: 1;
    visibility: visible;
}

.dpc-popup-content {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.dpc-popup-overlay.dpc-is-visible .dpc-popup-content {
    transform: scale(1);
}

.dpc-popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: #888;
    cursor: pointer;
    line-height: 1;
}

.dpc-popup-content h3 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 15px;
}

.dpc-popup-content p {
    text-align: center;
    color: #6c757d;
    margin-bottom: 25px;
}

#dpc-webhook-form .dpc-form-group {
    margin-bottom: 20px;
}

#dpc-webhook-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

#dpc-webhook-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
}

#dpc-webhook-form button {
    width: 100%;
}

#dpc-webhook-message {
    text-align: center;
    padding: 10px;
    border-radius: 5px;
    margin-top: 15px;
}

#dpc-webhook-message.dpc-error {
    background: #f8d7da;
    color: #721c24;
}

/* Teeth Selection Styles */
.dpc-teeth-selection {
    padding: 0;
}

.dpc-teeth-selection h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
}

.dpc-teeth-diagram {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin-bottom: 20px;
}

.dpc-jaw {
    margin-bottom: 25px;
}

.dpc-jaw h4 {
    text-align: center;
    color: #495057;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 500;
}

.dpc-teeth-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.dpc-tooth {
    position: relative;
    width: 35px;
    height: 45px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 6px;
    border: 2px solid #dee2e6;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dpc-tooth:hover {
    border-color: #007cba;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.2);
}

.dpc-tooth.selected {
    background: #007cba;
    border-color: #005a87;
    color: #fff;
}

.dpc-tooth-number {
    font-size: 10px;
    font-weight: 600;
    margin-bottom: 2px;
}

.dpc-tooth-visual {
    width: 20px;
    height: 25px;
    background: #e9ecef;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    transition: background-color 0.3s ease;
}

.dpc-tooth.selected .dpc-tooth-visual {
    background: #fff;
}

.dpc-selection-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.dpc-selected-info {
    text-align: center;
    font-weight: 600;
    color: #007cba;
    font-size: 16px;
}

.dpc-calculate-notice {
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #e8f5e8, #f0f8f0);
    border: 2px solid #4caf50;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(76, 175, 80, 0.1);
}

.dpc-calculate-notice p {
    margin: 0;
    color: #2e7d32;
    font-size: 16px;
    font-weight: 500;
}

/* Hide calculate notice when category is not active */
.dpc-dental-type-group[style*="display: none"] + .dpc-calculate-notice {
    display: none;
}

/* Dental Types Styles */
.dpc-dental-types {
    padding: 0;
}

.dpc-dental-types h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
}

.dpc-dental-type-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dpc-dental-type-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dpc-dental-type-option {
    background: #fff;
    border-radius: 8px;
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
}

.dpc-dental-type-option:hover {
    border-color: #007cba;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.1);
}

.dpc-radio-label {
    display: block;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

.dpc-radio-label input[type="radio"] {
    display: none;
}

.dpc-radio-content {
    padding: 20px;
}

.dpc-radio-label input[type="radio"]:checked + .dpc-radio-content {
    background: #e3f2fd;
    border-radius: 6px;
}

.dpc-radio-content h4 {
    color: #2c3e50;
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
}

.dpc-price {
    color: #007cba;
    font-weight: 700;
    font-size: 16px;
    margin: 0 0 8px 0;
}

.dpc-price-additional {
    color: #28a745;
    font-weight: 600;
    font-size: 14px;
    margin: 0 0 8px 0;
}

.dpc-description {
    color: #6c757d;
    font-size: 14px;
    margin: 0;
    line-height: 1.4;
}

/* Bridge Notice Styles */
.dpc-bridge-info {
    padding: 0;
}

.dpc-info-box {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #ffc107;
    background-color: #fff8e1;
}

.dpc-info-box p {
    margin: 0 0 10px 0;
    color: #495057;
}

.dpc-info-box ul {
    margin: 10px 0;
    padding-left: 30px;
}

.dpc-info-box li {
    color: #495057;
    margin-bottom: 8px;
}

.dpc-note {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ffd54f;
    font-weight: 600;
    color: #ff6f00 !important;
}

.dpc-service-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dpc-service-option {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.dpc-service-option:hover {
    border-color: #007cba;
    box-shadow: 0 2px 6px rgba(0, 124, 186, 0.1);
}

.dpc-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
}

.dpc-checkbox-label input[type="checkbox"] {
    margin-right: 12px;
    transform: scale(1.2);
}

.dpc-checkbox-text {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dpc-service-price {
    color: #28a745;
    font-weight: 600;
}

/* Calculation Result Styles */
.dpc-calculation-result {
    padding: 0;
}

.dpc-result-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.dpc-result-header h3 {
    color: #2c3e50;
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.dpc-result-content {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.dpc-breakdown {
    margin-bottom: 20px;
}

.dpc-breakdown h4 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.dpc-breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f3f4;
}

.dpc-breakdown-item:last-child {
    border-bottom: none;
}

.dpc-item-name {
    color: #495057;
    font-weight: 500;
}

.dpc-item-cost {
    color: #007cba;
    font-weight: 600;
    font-size: 16px;
}

.dpc-total-cost {
    text-align: center;
    padding: 20px;
    background: #e3f2fd;
    border-radius: 8px;
    margin-bottom: 20px;
}

.dpc-total-cost h3 {
    color: #1565c0;
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.dpc-disclaimer {
    text-align: center;
    margin-bottom: 20px;
}

.dpc-disclaimer p {
    color: #6c757d;
    font-style: italic;
    margin: 0;
}

.dpc-action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Button Styles */
.dpc-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.dpc-btn-primary {
    background: #007cba;
    color: #fff;
}

.dpc-btn-primary:hover {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.dpc-btn-secondary {
    background: #6c757d;
    color: #fff;
}

.dpc-btn-secondary:hover {
    background: #545b62;
    transform: translateY(-1px);
}

.dpc-btn-success {
    background: #28a745;
    color: #fff;
}

.dpc-btn-success:hover {
    background: #1e7e34;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .dpc-calculator-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .dpc-teeth-row {
        gap: 4px;
    }
    
    .dpc-tooth {
        width: 28px;
        height: 36px;
    }
    
    .dpc-tooth-number {
        font-size: 8px;
    }
    
    .dpc-tooth-visual {
        width: 16px;
        height: 20px;
    }
    
    .dpc-selection-controls {
        justify-content: center;
    }
    
    .dpc-result-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .dpc-action-buttons {
        flex-direction: column;
    }
    
    .dpc-calculator-header h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .dpc-calculator-container {
        padding: 15px;
        margin: 10px;
    }
    
    .dpc-teeth-selection,
    .dpc-dental-types,
    .dpc-additional-services,
    .dpc-calculation-result {
        padding: 20px;
    }
    
    .dpc-tooth {
        width: 24px;
        height: 30px;
    }
    
    .dpc-tooth-number {
        font-size: 7px;
    }
    
    .dpc-tooth-visual {
        width: 14px;
        height: 16px;
    }
}
