/**
 * Balanskliniek Professional Matcher - Frontend Styles
 */

/* ==========================================================================
   Balanskliniek Professional Matcher - Frontend Styles
   Version: 1.3.3
   ========================================================================== */

/* ==========================================================================
   Multi-step Flow
   ========================================================================== */
.bkm-step {
    animation: bkm-fade-in 0.3s ease;
}

@keyframes bkm-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bkm-step-header {
    margin-bottom: 1rem;
}

.bkm-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    background: transparent;
    color: var(--green, #365943);
    border: none;
    font-size: 0.95rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.bkm-back-btn:hover {
    color: #2a4735;
}

.bkm-back-icon {
    font-size: 1.1rem;
}

/* ==========================================================================
   Container & Layout
   ========================================================================== */
.bkm-match-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(54, 89, 67, 0.09);
    border-radius: 20px;
    min-height: 480px;
    display: flex;
    flex-direction: column;
}

.bkm-match-container .bkm-step {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   Introduction Section
   ========================================================================== */
.bkm-match-intro {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem 0;
}

.bkm-match-intro h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: #1a1a1a;
}

.bkm-match-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #4a4a4a;
    margin-bottom: 1.25rem;
    text-align: center;
}

.bkm-privacy-notice {
    background: #fff;
    border-left: 4px solid #9c0a0a;
    padding: 1.25rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 1.5rem;
    text-align: left;
    width: 100%;
    max-width: 500px;
}

.bkm-privacy-icon {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    display: block;
}

.bkm-privacy-notice p {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #495057;
}

.bkm-privacy-notice p:last-child {
    margin-bottom: 0;
}

.bkm-privacy-storage {
    color: #6c757d !important;
    font-size: 0.9rem !important;
    opacity: 0.7;
    margin-top: 1rem !important;
    padding-top: 0.75rem;
    border-top: 1px solid #eee;
}

/* ==========================================================================
   Form Styles
   ========================================================================== */
.bkm-match-form {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.bkm-form-group {
    margin-bottom: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.bkm-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
    font-size: 1rem;
}

.bkm-form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.6;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    resize: vertical;
    min-height: 140px;
    flex: 1;
    font-family: inherit;
}

.bkm-form-group textarea:focus {
    outline: none;
    border-color: var(--green, #365943);
    box-shadow: 0 0 0 3px rgba(54, 89, 67, 0.15);
}

.bkm-form-group textarea::placeholder {
    color: #9ca3af;
    font-size: 0.95rem;
}

.bkm-char-count {
    display: block;
    text-align: right;
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.35rem;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.bkm-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--green, #365943);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: auto;
}

.bkm-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(54, 89, 67, 0.3);
    background: #2a4735;
}

.bkm-submit-btn:active {
    transform: translateY(0);
}

.bkm-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.bkm-btn-icon {
    transition: transform 0.2s ease;
}

.bkm-submit-btn:hover .bkm-btn-icon {
    transform: translateX(4px);
}

.bkm-secondary-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #fff;
    color: var(--green, #365943);
    border: 2px solid var(--green, #365943);
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.bkm-secondary-btn:hover {
    background: var(--green, #365943);
    color: #fff;
}

.bkm-tertiary-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: transparent;
    color: #6c757d;
    border: 1px solid #dee2e6;
    border-radius: 50px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bkm-tertiary-btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

/* ==========================================================================
   Loader
   ========================================================================== */
.bkm-loader {
    text-align: center;
    padding: 3rem 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.bkm-loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e0e0e0;
    border-top-color: var(--green, #365943);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    animation: bkm-spin 1s linear infinite;
}

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

.bkm-loader-text {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.35rem;
}

.bkm-loader-subtext {
    font-size: 0.9rem;
    color: #6c757d;
}

/* ==========================================================================
   Results Section
   ========================================================================== */
.bkm-results {
    padding: 0 0 1rem 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.bkm-results-title {
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

.bkm-results-intro {
    color: var(--green, #365943);
    font-weight: 500;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.bkm-results-list {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    margin-bottom: 1rem;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Custom scrollbar for results */
.bkm-results-list::-webkit-scrollbar {
    width: 6px;
}

.bkm-results-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.bkm-results-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.bkm-results-list::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* ==========================================================================
   Professional Card
   ========================================================================== */
.bkm-professional-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bkm-professional-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.bkm-professional-link {
    text-decoration: none !important;
    color: inherit;
    display: block;
}

.bkm-professional-inner {
    display: flex;
    gap: 1rem;
    padding: 1rem;
}

.bkm-professional-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
}

.bkm-professional-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0 !important;
}

.bkm-professional-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    color: #adb5bd;
    font-size: 1.75rem;
}

.bkm-professional-content {
    flex: 1;
    min-width: 0;
}

.bkm-professional-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 0.25rem 0;
}

.bkm-professional-location {
    font-size: 0.85rem;
    color: var(--green, #365943);
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.bkm-professional-location:not(:empty)::before {
    content: "📍";
    font-size: 0.75rem;
}

/* Professional card buttons */
.bkm-professional-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.bkm-waarom-btn {
    padding: 0.4rem 0.75rem;
    background: transparent;
    color: var(--green, #365943);
    border: 1px solid var(--green, #365943);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bkm-waarom-btn:hover {
    background: var(--green, #365943);
    color: #fff;
}

.bkm-profile-btn {
    padding: 0.4rem 0.75rem;
    background: var(--green, #365943);
    color: #fff !important;
    border: 1px solid var(--green, #365943);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bkm-profile-btn:hover {
    background: #2a4735;
    border-color: #2a4735;
}

/* Uitleg section (hidden by default) */
.bkm-uitleg {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #eee;
}

.bkm-uitleg p {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.5;
    margin: 0;
}

.bkm-professional-description {
    display: none; /* Hidden - replaced by uitleg */
}

/* ==========================================================================
   Error State
   ========================================================================== */
.bkm-error {
    background: #fff;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.bkm-error-message {
    color: #721c24;
    margin-bottom: 1rem;
    font-size: 1rem;
}

/* ==========================================================================
   Viewed Professionals (Shortcode)
   ========================================================================== */
.bkm-viewed-professionals {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem 0;
}

.bkm-viewed-title {
    font-size: 1.35rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.bkm-viewed-list {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    margin-bottom: 1rem;
    max-height: 420px; /* Approx 5.5 items */
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Custom scrollbar for viewed list */
.bkm-viewed-list::-webkit-scrollbar {
    width: 6px;
}

.bkm-viewed-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.bkm-viewed-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.bkm-viewed-list::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.bkm-viewed-empty {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    color: #6c757d;
    font-size: 1rem;
}

.bkm-viewed-loading {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 600px) {
    .bkm-match-container {
        padding: 1.25rem;
        margin: 0;
        border-radius: 16px;
        min-height: 420px;
    }
    
    .bkm-match-intro h2 {
        font-size: 1.3rem;
    }
    
    .bkm-match-description,
    .bkm-privacy-notice p {
        font-size: 0.95rem;
    }
    
    .bkm-match-form {
        padding: 1.25rem;
    }
    
    .bkm-professional-inner {
        gap: 0.875rem;
    }
    
    .bkm-professional-image {
        width: 70px;
        height: 70px;
    }
}

@media (max-width: 400px) {
    .bkm-match-container {
        padding: 1rem;
    }
    
    .bkm-professional-inner {
        gap: 0.75rem;
    }
    
    .bkm-professional-image {
        width: 60px;
        height: 60px;
    }
}

/* Intro & Results Buttons */
.bkm-intro-buttons,
.bkm-results-buttons,
.bkm-form-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    margin-top: 1rem;
}

.bkm-results-buttons {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
}

/* Popups */
.bkm-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bkm-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.bkm-popup-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: bkm-popup-in 0.3s ease;
}

@keyframes bkm-popup-in {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.bkm-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.bkm-popup-close:hover {
    background: #f0f0f0;
    color: #333;
}

.bkm-popup-content h3 {
    margin: 0 0 1rem 0;
    padding-right: 2rem;
}

.bkm-popup-body {
    color: #4a4a4a;
    line-height: 1.6;
}

body.bkm-popup-open {
    overflow: hidden;
}

/* Feedback Rating */
.bkm-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 0.25rem;
    margin: 0.5rem 0 1rem;
}

.bkm-rating input { display: none; }

.bkm-rating label {
    font-size: 1.75rem;
    cursor: pointer;
    filter: grayscale(1);
    opacity: 0.4;
    transition: all 0.2s ease;
}

.bkm-rating label:hover,
.bkm-rating label:hover ~ label,
.bkm-rating input:checked ~ label {
    filter: grayscale(0);
    opacity: 1;
}

#bkm-feedback-form .bkm-form-group { margin-bottom: 1rem; }
#bkm-feedback-form label { display: block; margin-bottom: 0.5rem; font-weight: 500; }
#bkm-feedback-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}
#bkm-feedback-form textarea:focus {
    outline: none;
    border-color: var(--green, #365943);
}
#bkm-feedback-form .bkm-submit-btn { width: 100%; margin-top: 0.5rem; }

.bkm-success-message {
    text-align: center;
    font-size: 1.1rem;
    color: var(--green, #365943);
    padding: 2rem 0;
}
