/**
 * OfferteTool WordPress Plugin Styles - Exact match van originele app
 * 
 * @package OfferteToolWP
 */

/* Base styling - exactly like original app */
body {
    background-color: #f8f9fa;
}

.container {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

h1 {
    color: #2c3e50;
    border-bottom: 2px solid #eee;
    padding-bottom: 1rem;
}

h3 {
    color: #34495e;
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 500;
    color: #2c3e50;
}

.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.btn-primary {
    background-color: #3498db;
    border-color: #3498db;
    padding: 0.5rem 2rem;
}

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
}

.invalid-feedback {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 5px;
    display: none;
}

/* Progress bar styling */
.progress {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
}

.progress-bar {
    background-color: #007bff;
    transition: width 0.6s ease;
}

/* Step indicator */
.badge {
    font-size: 0.875rem;
}

/* Form steps */
.form-step {
    display: none;
}

.form-step[data-step="1"] {
    display: block;
}

/* Section headers */
h5.border-bottom {
    border-bottom: 1px solid #dee2e6 !important;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

h6.border-bottom {
    border-bottom: 1px solid #dee2e6 !important;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* Form text styling */
.form-text {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #6c757d;
}

/* Monitoring type fields */
.monitoring-type-fields {
    display: none;
    margin-top: 1rem;
}

/* Button styling */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
}

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

.btn-success {
    background-color: #198754;
    border-color: #198754;
}

/* Alert styling */
.alert {
    border: 1px solid transparent;
    border-radius: 0.375rem;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

/* Card styling - match original app */
.card {
    border: 1px solid rgba(0,0,0,.125);
    border-radius: 0.375rem;
    background-color: #fff;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.card-header {
    padding: 0.75rem 1.25rem;
    margin-bottom: 0;
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    border-top-left-radius: calc(0.375rem - 1px);
    border-top-right-radius: calc(0.375rem - 1px);
}

.card-header.bg-primary {
    background-color: #007bff !important;
    color: #fff;
    border-color: #007bff;
}

.card-header h4 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 500;
}

.card-body {
    flex: 1 1 auto;
    padding: 1.25rem;
}

/* Form styling - match Bootstrap defaults */
.form-control,
.form-select {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-image: none;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus,
.form-select:focus {
    color: #212529;
    background-color: #fff;
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    appearance: none;
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

.is-invalid ~ .invalid-feedback {
    display: block;
}

/* Responsive design - match original */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }

    .card-body {
        padding: 1rem;
    }

    .btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
}

/* Loading spinner */
.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: text-bottom;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

/* Text utilities */
.text-muted {
    color: #6c757d !important;
}

.text-primary {
    color: #007bff !important;
}

.text-white {
    color: #fff !important;
}

/* Margin/Padding utilities */
.me-1 {
    margin-right: 0.25rem !important;
}

.me-2 {
    margin-right: 0.5rem !important;
}

.ms-1 {
    margin-left: 0.25rem !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.py-4 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}

.px-3 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

.py-2 {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

.pb-2 {
    padding-bottom: 0.5rem !important;
}

/* Display utilities */
.d-flex {
    display: flex !important;
}

.d-block {
    display: block !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.justify-content-center {
    justify-content: center !important;
}

.align-items-center {
    align-items: center !important;
}

/* Grid system */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -0.75rem;
    margin-left: -0.75rem;
}

.col-md-4,
.col-md-6,
.col-md-8,
.col-md-10 {
    position: relative;
    width: 100%;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
}

@media (min-width: 768px) {
    .col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
    
    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .col-md-8 {
        flex: 0 0 66.666667%;
        max-width: 66.666667%;
    }
    
    .col-md-10 {
        flex: 0 0 83.333333%;
        max-width: 83.333333%;
    }
}

/* Badge styling */
.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
}

.badge.rounded-pill {
    border-radius: 50rem;
}

.bg-primary {
    background-color: #007bff !important;
}

/* Remove unused styles that conflict with Bootstrap */
/* This section intentionally left minimal to let Bootstrap handle styling */

/* Only keep essential custom styles */
/* Let Bootstrap handle most of the styling for consistency */

/* Responsive Design */
@media (max-width: 768px) {
    .offerte-tool-container {
        padding: 15px;
    }
    
    .card-body {
        padding: 20px 15px;
    }
    
    .service-fields {
        padding: 15px;
    }
    
    .monitoring-params {
        padding: 12px;
    }
    
    .btn-lg {
        padding: 12px 25px;
        font-size: 1rem;
    }
    
    #price-display {
        font-size: 1.5rem;
    }
    
    .offerte-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
}

@media (max-width: 576px) {
    .card-header {
        padding: 12px 15px;
    }
    
    .card-header h3 {
        font-size: 1.1rem;
    }
    
    .form-control,
    .form-select {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
    
    #price-display {
        font-size: 1.3rem;
    }
}

/* Iframe Styling */
.offerte-tool-iframe {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Powered by Link */
.offerte-tool-container small a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.3s ease;
}

.offerte-tool-container small a:hover {
    color: #3498db;
    text-decoration: underline;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-down {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 500px;
        transform: translateY(0);
    }
}

/* Form Progress Indicator */
.form-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 0 20px;
}

.progress-step {
    flex: 1;
    text-align: center;
    position: relative;
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

.progress-step.active {
    color: #3498db;
}

.progress-step.completed {
    color: #27ae60;
}

.progress-step::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #e9ecef;
    border: 2px solid #e9ecef;
}

.progress-step.active::before {
    background-color: #3498db;
    border-color: #3498db;
}

.progress-step.completed::before {
    background-color: #27ae60;
    border-color: #27ae60;
}

/* Loading Button State */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Custom Checkbox and Radio Styling */
.form-check-input:checked {
    background-color: #3498db;
    border-color: #3498db;
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* Print Styles */
@media print {
    .offerte-tool-container {
        box-shadow: none;
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
        break-inside: avoid;
    }
    
    .btn,
    .alert {
        display: none;
    }
}

/* Dark mode disabled - keeping consistent appearance */

/* Accessibility Improvements */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Focus Indicators */
.form-control:focus,
.form-select:focus,
.btn:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000000;
    }
    
    .form-control,
    .form-select {
        border: 2px solid #000000;
    }
    
    .btn-primary {
        background: #000000;
        border: 2px solid #000000;
        color: #ffffff;
    }
}