/* Bouwshop Twente Herroeping Formulier Styling */
:root {
    --bst-primary: #005599;
    --bst-primary-hover: #00447a;
    --bst-primary-dark: #003661;
    --bst-accent: #005599;
    --bst-accent-hover: #00447a;
    --bst-orange: #f8723f;
    --bst-orange-hover: #e55e2b;
    --bst-bg-light: #f8fafc;
    --bst-border: #cbd5e1;
    --bst-border-light: #e2e8f0;
    --bst-text-dark: #1e293b;
    --bst-text-muted: #64748b;
    --bst-radius: 8px;
    --bst-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --bst-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);

    /* Backwards compatibility aliases */
    --pb-navy: var(--bst-primary);
    --pb-navy-dark: var(--bst-primary-dark);
    --pb-green: var(--bst-accent);
    --pb-green-hover: var(--bst-accent-hover);
    --pb-orange: var(--bst-orange);
    --pb-orange-hover: var(--bst-orange-hover);
    --pb-bg-light: var(--bst-bg-light);
    --pb-border: var(--bst-border);
    --pb-border-light: var(--bst-border-light);
    --pb-text-dark: var(--bst-text-dark);
    --pb-text-muted: var(--bst-text-muted);
    --pb-radius: var(--bst-radius);
    --pb-shadow: var(--bst-shadow);
}

.bst-herroeping-container,
.pb-herroeping-container {
    max-width: 680px;
    margin: 30px auto 30px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: var(--bst-text-dark);
}

.bst-herroeping-container.bst-align-left,
.pb-herroeping-container.pb-align-left {
    margin-left: 0;
    margin-right: auto;
}

.bst-herroeping-container.bst-align-center,
.pb-herroeping-container.pb-align-center {
    margin-left: auto;
    margin-right: auto;
}

.bst-herroeping-container.bst-align-right,
.pb-herroeping-container.pb-align-right {
    margin-left: auto;
    margin-right: 0;
}

/* Voortgangsbalk stappen */
.bst-herroeping-steps,
.pb-herroeping-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    padding: 0 5px;
}

.bst-step-item,
.pb-step-item {
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.bst-step-item.active,
.pb-step-item.active {
    opacity: 1;
}

.bst-step-num,
.pb-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #cbd5e1;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    transition: background-color 0.3s ease;
}

.bst-step-item.active .bst-step-num,
.pb-step-item.active .pb-step-num {
    background: var(--bst-primary);
}

.bst-step-title,
.pb-step-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--bst-primary);
}

.bst-step-line,
.pb-step-line {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    margin: 0 12px;
}

/* Kaart-container */
.bst-herroeping-card,
.pb-herroeping-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 35px;
    box-shadow: var(--bst-shadow);
    border: 1px solid var(--bst-border-light);
    transition: box-shadow 0.2s ease;
}

.bst-card-title,
.pb-card-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--bst-primary);
    margin: 0 0 8px 0;
    letter-spacing: -0.3px;
    line-height: 1.3;
}

.bst-card-subtitle,
.pb-card-subtitle {
    font-size: 14px;
    color: var(--bst-text-muted);
    margin: 0 0 25px 0;
    line-height: 1.5;
}

/* Meldingen */
.bst-form-alert,
.pb-form-alert {
    padding: 12px 16px;
    border-radius: var(--bst-radius);
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.4;
}

.bst-form-alert.error,
.pb-form-alert.error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Formulier invoervelden */
.bst-form-group,
.pb-form-group {
    margin-bottom: 20px;
}

.bst-form-group label,
.pb-form-group label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #475569;
    margin-bottom: 6px;
}

.bst-form-group label .required,
.pb-form-group label .required {
    color: var(--bst-orange);
}

.bst-input,
.bst-textarea,
.pb-input,
.pb-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--bst-border);
    border-radius: var(--bst-radius);
    font-size: 14px;
    color: var(--bst-text-dark);
    background-color: var(--bst-bg-light);
    transition: all 0.2s ease;
    box-sizing: border-box;
    outline: none;
    box-shadow: none;
}

.bst-input:focus,
.bst-textarea:focus,
.pb-input:focus,
.pb-textarea:focus {
    outline: none;
    background-color: #ffffff;
    border-color: var(--bst-primary);
    box-shadow: 0 0 0 3px rgba(0, 85, 153, 0.15);
}

.bst-textarea,
.pb-textarea {
    resize: vertical;
    min-height: 90px;
}

/* Knoppen */
.bst-form-actions,
.pb-form-actions {
    margin-top: 30px;
}

.bst-actions-split,
.pb-actions-split {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.bst-btn,
.pb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--bst-radius);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
    box-sizing: border-box;
}

.bst-btn-primary,
.pb-btn-primary {
    background-color: var(--bst-primary);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 85, 153, 0.25);
}

.bst-btn-primary:hover,
.pb-btn-primary:hover {
    background-color: var(--bst-primary-hover);
    color: #ffffff;
}

.bst-btn-secondary,
.pb-btn-secondary {
    background-color: #f1f5f9;
    color: var(--bst-primary);
    border: 1px solid var(--bst-border);
}

.bst-btn-secondary:hover,
.pb-btn-secondary:hover {
    background-color: #e2e8f0;
    color: var(--bst-primary);
}

.bst-btn-portal,
.pb-btn-sendcloud {
    background-color: var(--bst-primary);
    color: #ffffff;
    width: 100%;
    margin-top: 15px;
}

.bst-btn-portal:hover,
.pb-btn-sendcloud:hover {
    background-color: var(--bst-primary-dark);
    color: #ffffff;
}

.bst-btn:disabled,
.bst-btn[disabled],
.pb-btn:disabled,
.pb-btn[disabled] {
    background-color: #cbd5e1 !important;
    color: #94a3b8 !important;
    border-color: #cbd5e1 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    opacity: 0.6;
}

/* Artikelselectie lijst */
.bst-select-all-bar,
.pb-select-all-bar {
    background-color: var(--bst-bg-light);
    padding: 12px 16px;
    border-radius: var(--bst-radius);
    border: 1px solid var(--bst-border-light);
    margin-bottom: 15px;
}

#bst-herroeping-wrapper label.bst-checkbox-label,
#bst-herroeping-wrapper label:has(> input[type="checkbox"]),
#pb-herroeping-wrapper label.pb-checkbox-label,
#pb-herroeping-wrapper label:has(> input[type="checkbox"]),
.bst-checkbox-label,
.pb-checkbox-label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    font-size: 14px !important;
    cursor: pointer !important;
    user-select: none !important;
    color: var(--bst-text-dark) !important;
    position: relative !important;
    padding: 0 !important;
    padding-left: 0 !important;
    margin: 0 !important;
    min-height: 0 !important;
}

/* Verberg de native checkbox */
#bst-herroeping-wrapper .bst-checkbox-label input[type="checkbox"],
#pb-herroeping-wrapper .pb-checkbox-label input[type="checkbox"],
.bst-checkbox-label input[type="checkbox"],
.pb-checkbox-label input[type="checkbox"] {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    left: -9999px !important;
    pointer-events: none !important;
    clip: rect(0, 0, 0, 0) !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

/* Thema reset immuniteit */
#bst-herroeping-wrapper .bst-checkbox-label::before,
#bst-herroeping-wrapper .bst-checkbox-label::after,
#bst-herroeping-wrapper label::before,
#bst-herroeping-wrapper label::after,
#bst-herroeping-wrapper .bst-select-all-bar label::before,
#bst-herroeping-wrapper .bst-select-all-bar label::after,
#bst-herroeping-wrapper .bst-item-card label::before,
#bst-herroeping-wrapper .bst-item-card label::after,
#bst-herroeping-wrapper input[type="checkbox"]::before,
#bst-herroeping-wrapper input[type="checkbox"]::after,
.bst-checkbox-label::before,
.bst-checkbox-label::after {
    content: none !important;
    display: none !important;
    border: none !important;
    background: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
}

/* Custom visual checkbox element */
.bst-custom-checkbox,
.pb-custom-checkbox {
    display: inline-block !important;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    border: 2px solid #cbd5e1 !important;
    border-radius: 6px !important;
    background-color: #ffffff !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
}

.bst-checkbox-label:hover .bst-custom-checkbox,
.pb-checkbox-label:hover .pb-custom-checkbox {
    border-color: #005599 !important;
    background-color: #f8fafc !important;
}

.bst-checkbox-label input[type="checkbox"]:checked + .bst-custom-checkbox,
.pb-checkbox-label input[type="checkbox"]:checked + .pb-custom-checkbox {
    background-color: #005599 !important;
    border-color: #005599 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 14px 14px !important;
}

.bst-checkbox-label input[type="checkbox"]:focus-visible + .bst-custom-checkbox,
.pb-checkbox-label input[type="checkbox"]:focus-visible + .pb-custom-checkbox {
    box-shadow: 0 0 0 3px rgba(0, 85, 153, 0.2) !important;
}

.bst-items-list,
.pb-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.bst-item-card,
.pb-item-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 18px;
    border: 1px solid var(--bst-border-light);
    border-radius: var(--bst-radius);
    background: #ffffff;
    transition: all 0.2s ease;
}

.bst-item-card:hover,
.pb-item-card:hover {
    border-color: var(--bst-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.bst-item-thumb,
.pb-item-thumb {
    width: 55px;
    height: 55px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid var(--bst-border-light);
    background: #ffffff;
}

.bst-item-details,
.pb-item-details {
    flex: 1;
}

.bst-item-title,
.pb-item-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--bst-primary);
    margin: 0 0 3px 0;
    line-height: 1.3;
}

.bst-item-meta,
.pb-item-meta {
    font-size: 12px;
    color: var(--bst-text-muted);
}

.bst-item-qty-wrapper,
.pb-item-qty-wrapper {
    flex-shrink: 0;
}

.bst-item-qty-select,
.pb-item-qty-select {
    min-width: 82px;
    height: 38px;
    padding: 0 32px 0 12px;
    border: 1px solid var(--bst-border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    background-color: #f8fafc;
    color: var(--bst-primary);
    outline: none;
    cursor: pointer;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23005599' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: all 0.2s ease;
}

.bst-item-qty-select:hover,
.pb-item-qty-select:hover {
    background-color: #ffffff;
    border-color: var(--bst-primary);
}

.bst-item-qty-select:focus,
.pb-item-qty-select:focus {
    border-color: var(--bst-primary);
    box-shadow: 0 0 0 3px rgba(0, 85, 153, 0.15);
    background-color: #ffffff;
}

/* Bevestigingsweergave */
.bst-success-header,
.pb-success-header {
    text-align: center;
    margin-bottom: 25px;
}

.bst-success-icon,
.pb-success-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(0, 85, 153, 0.12);
    color: var(--bst-primary);
    font-size: 26px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px auto;
}

.bst-badge-verzonden,
.pb-badge-verzonden {
    display: inline-block;
    background-color: var(--bst-primary);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.bst-confirmation-box,
.pb-confirmation-box {
    background: var(--bst-bg-light);
    border: 1px solid var(--bst-border-light);
    border-radius: var(--bst-radius);
    padding: 20px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
}

.bst-confirm-items-summary ul,
.pb-confirm-items-summary ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.bst-confirm-items-summary li,
.pb-confirm-items-summary li {
    margin-bottom: 4px;
}

.bst-portal-cta,
.pb-sendcloud-cta {
    background: #f0f7ff;
    border: 1px solid #bae6fd;
    border-radius: var(--bst-radius);
    padding: 20px;
    text-align: center;
    margin-bottom: 25px;
}

.bst-portal-cta h3,
.pb-sendcloud-cta h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: var(--bst-primary);
}

.bst-portal-cta p,
.pb-sendcloud-cta p {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: var(--bst-text-muted);
}

/* Spinner */
.bst-spinner,
.pb-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: bst-spin 0.8s linear infinite;
    margin-left: 8px;
}

@keyframes bst-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 600px) {
    .bst-herroeping-card,
    .pb-herroeping-card {
        padding: 20px;
    }
    .bst-actions-split,
    .pb-actions-split {
        flex-direction: column;
    }
    .bst-btn,
    .pb-btn {
        width: 100%;
    }
}
