/* pd-calculator.css */
.pd-calculator-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.pd-calculator-header {
    text-align: center;
    margin-bottom: 25px;
}

.pd-calculator-header h2 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.pd-calculator-header p {
    color: #7f8c8d;
    font-size: 16px;
}

.pd-calculator-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}

.pd-calculator-step {
    text-align: center;
    flex: 1;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    margin: 0 10px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
    position: relative;
    z-index: 2;
}

.pd-calculator-step.active {
    background: #3498db;
    color: white;
}

.pd-calculator-step-number {
    display: block;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.pd-calculator-step-title {
    font-weight: 600;
    font-size: 16px;
}

.pd-calculator-step-progress {
    position: absolute;
    height: 4px;
    background: #3498db;
    top: 30px;
    left: 0;
    width: 0;
    z-index: 1;
    transition: width 0.5s ease;
}

.pd-calculator-content {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.pd-calculator-video-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto 20px;
}

.pd-calculator-video {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: block;
}

.pd-calculator-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.pd-calculator-instructions {
    text-align: center;
    margin: 20px 0;
    color: #2c3e50;
    font-size: 16px;
    line-height: 1.6;
}

.pd-calculator-controls {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.pd-calculator-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pd-calculator-btn-primary {
    background: #3498db;
    color: white;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.pd-calculator-btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.4);
}

.pd-calculator-btn-secondary {
    background: #ecf0f1;
    color: #2c3e50;
}

.pd-calculator-btn-secondary:hover {
    background: #d5dbdb;
    transform: translateY(-2px);
}

.pd-calculator-result {
    text-align: center;
    padding: 20px;
}

.pd-calculator-result-value {
    font-size: 48px;
    font-weight: bold;
    color: #27ae60;
    margin: 20px 0;
}

.pd-calculator-result-info {
    color: #7f8c8d;
    font-size: 16px;
    max-width: 500px;
    margin: 0 auto 25px;
    line-height: 1.6;
}

.pd-calculator-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.pd-calculator-actions .pd-calculator-btn {
    min-width: 180px;
}

.pd-calculator-ruler-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.pd-ruler-header {
    text-align: center;
    margin-bottom: 25px;
}

.pd-ruler-header h2 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.pd-ruler-header p {
    color: #7f8c8d;
    font-size: 16px;
}

.pd-ruler-print {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-align: center;
}

.pd-ruler-print-content {
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    display: inline-block;
}

.pd-ruler-scale {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    height: 80px;
}

.pd-ruler-mm {
    position: absolute;
    top: 0;
    width: 1px;
    height: 20px;
    background: #333;
}

.pd-ruler-mm-label {
    position: absolute;
    top: 25px;
    font-size: 12px;
    color: #333;
    transform: translateX(-50%);
}

.pd-ruler-cm {
    position: absolute;
    top: 0;
    width: 2px;
    height: 30px;
    background: #333;
}

.pd-ruler-cm-label {
    position: absolute;
    top: 35px;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    transform: translateX(-50%);
}

.pd-ruler-instructions {
    margin: 30px 0;
    padding: 20px;
    background: #e8f4fc;
    border-radius: 8px;
    text-align: left;
}

.pd-ruler-instructions h3 {
    margin-top: 0;
    color: #2c3e50;
}

.pd-ruler-instructions ol {
    padding-left: 20px;
}

.pd-ruler-instructions li {
    margin-bottom: 10px;
    line-height: 1.5;
}

.pd-ruler-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.pd-ruler-actions .pd-calculator-btn {
    min-width: 180px;
}

.pd-calculator-error {
    color: #e74c3c;
    text-align: center;
    padding: 15px;
    background: #fadbd8;
    border-radius: 8px;
    margin: 15px 0;
}

.pd-calculator-success {
    color: #27ae60;
    text-align: center;
    padding: 15px;
    background: #d5f5e3;
    border-radius: 8px;
    margin: 15px 0;
}

@media (max-width: 768px) {
    .pd-calculator-steps {
        flex-direction: column;
    }
    
    .pd-calculator-step {
        margin: 5px 0;
    }
    
    .pd-calculator-step-progress {
        display: none;
    }
    
    .pd-calculator-controls, 
    .pd-calculator-actions,
    .pd-ruler-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .pd-calculator-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}