/* ============================================
   CITES DESKUNDIGENVERKLARING - STYLING
   ============================================ */

/* Beta badge */
.beta-badge {
    display: inline-block;
    background: #8D6E63;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    letter-spacing: 0.05em;
    vertical-align: middle;
    margin-left: 0.3rem;
}

/* Tabs */
.cites-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #ece8e1;
    padding-bottom: 0;
}

.cites-tab-btn {
    padding: 0.6rem 1.25rem;
    border: none;
    background: transparent;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    color: #a09080;
    font-family: var(--body-font);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.cites-tab-btn:hover {
    color: #5D4037;
    background: #faf8f5;
}

.cites-tab-btn.active {
    background: transparent;
    color: #3E2723;
    border-bottom-color: #8D6E63;
}

.cites-tab-content {
    display: none;
}

.cites-tab-content.active {
    display: block;
}

/* Login Vereist */
.cites-login-required {
    padding: 2rem 0;
}

.login-card {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    border: 1px solid #ece8e1;
    max-width: 500px;
    margin: 0 auto;
}

.login-card h2 {
    margin-bottom: 1rem;
    color: #3E2723;
}

.login-card a {
    color: #6D4C41;
    font-weight: 500;
}

/* Dashboard */
.cites-dashboard {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #ece8e1;
}

.dashboard-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-header-bar h2 {
    color: #3E2723;
    font-size: 1.2rem;
}

/* Declarations List */
.declarations-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.declaration-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #faf8f5;
    border-radius: 6px;
    border-left: 3px solid #ece8e1;
    transition: all 0.2s;
    flex-wrap: wrap;
}

.declaration-card:hover {
    background: #f5f2ed;
}

.declaration-card.paid {
    border-left-color: #8aab8a;
}

.declaration-card.draft {
    border-left-color: #c5a860;
}

.declaration-card.pending {
    border-left-color: #8D6E63;
}

.declaration-info {
    flex: 1;
    min-width: 200px;
}

.declaration-ref {
    font-weight: 600;
    color: #3E2723;
    font-size: 0.9rem;
}

.declaration-details {
    display: flex;
    gap: 1rem;
    font-size: 0.82rem;
    color: #a09080;
    margin-top: 0.25rem;
    flex-wrap: wrap;
}

.declaration-status {
    margin: 0 0.5rem;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.paid {
    background: #f0f5f0;
    color: #4a6a4a;
}

.status-badge.draft {
    background: #faf5ed;
    color: #7a6530;
}

.status-badge.pending {
    background: #faf8f5;
    color: #6D4C41;
}

.declaration-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.4rem 0.75rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-family: var(--body-font);
    transition: all 0.2s;
}

.btn-small.btn-download {
    background: #f0ece6;
    color: #3E2723;
    border: 1px solid #d5cec4;
    transition: all 0.3s ease;
    min-width: 70px;
}

.btn-small.btn-download:hover {
    background: #e8e2d9;
    border-color: #8D6E63;
}

/* Download gereed state — groene knop met pulse animatie */
.btn-small.btn-download.download-ready {
    background: #2D6A4F;
    color: white;
    min-width: auto;
    white-space: nowrap;
    animation: downloadPulse 1.5s ease-in-out 2;
}

.btn-small.btn-download.download-ready:hover {
    background: #1B5E20;
}

.btn-download.download-ready {
    background: #2D6A4F !important;
    color: white !important;
    animation: downloadPulse 1.5s ease-in-out 2;
}

.btn-download.download-ready:hover {
    background: #1B5E20 !important;
}

@keyframes downloadPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(45, 106, 79, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(45, 106, 79, 0); }
}

.btn-small.btn-edit {
    background: #e0e0e0;
    color: #333;
}

.btn-small.btn-edit:hover {
    background: #d0d0d0;
}

.btn-small.btn-delete {
    background: #f8d7da;
    color: #721c24;
}

.btn-small.btn-delete:hover {
    background: #f1c0c4;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #a09080;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: #5D4037;
    margin-bottom: 0.5rem;
}

.empty-state p {
    margin-bottom: 1.5rem;
}

/* Step Indicator */
.steps-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 2rem;
    padding: 1rem;
    flex-wrap: wrap;
}

.step-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    min-width: 60px;
}

.step-dot span {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ece8e1;
    color: #a09080;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.step-dot small {
    font-size: 0.7rem;
    color: #a09080;
    white-space: nowrap;
}

.step-dot.active span {
    background: #8D6E63;
    color: white;
}

.step-dot.active small {
    color: #5D4037;
    font-weight: 600;
}

.step-dot.completed span {
    background: #8D6E63;
    color: white;
}

.step-dot.completed small {
    color: #8D6E63;
}

.step-line {
    width: 30px;
    height: 1px;
    background: #ece8e1;
    margin: 0 0.25rem;
    margin-bottom: 20px;
}

/* Step Wizard */
.wizard-step {
    display: none;
    background: white;
    border-radius: 8px;
    padding: 1.5rem 2rem;
    border: 1px solid #ece8e1;
}

.wizard-step.active {
    display: block;
}

.wizard-step h2 {
    color: #3E2723;
    margin-bottom: 0.5rem;
    font-size: 1.15rem;
}

.step-description {
    color: #a09080;
    margin-bottom: 1.25rem;
    font-size: 0.88rem;
}

/* CITES Form */
.cites-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cites-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.cites-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    position: relative;
}

.cites-form label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #3E2723;
}

.cites-form input[type="text"],
.cites-form input[type="email"],
.cites-form input[type="tel"],
.cites-form input[type="number"],
.cites-form input[type="date"],
.cites-form select,
.cites-form textarea {
    padding: 0.65rem 0.85rem;
    border: 1px solid #ece8e1;
    border-radius: 6px;
    font-size: 0.88rem;
    transition: border-color 0.2s;
    font-family: var(--body-font);
}

.cites-form input:focus,
.cites-form select:focus,
.cites-form textarea:focus {
    border-color: #8D6E63;
    outline: none;
}

.cites-form small {
    font-size: 0.75rem;
    color: #a09080;
}

/* Toggle Label (checkbox) */
.toggle-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 400 !important;
    font-size: 0.9rem;
    line-height: 1.4;
}

.toggle-label input[type="checkbox"] {
    margin-top: 0.15rem;
    width: 18px;
    height: 18px;
    accent-color: #5D4037;
    flex-shrink: 0;
}

/* Account Owner Info */
.account-owner-info {
    background: #faf8f5;
    padding: 1rem 1.25rem;
    border-radius: 6px;
    border: 1px solid #ece8e1;
    font-size: 0.88rem;
    line-height: 1.8;
}

.account-owner-info p {
    margin: 0;
}

/* Custom Owner Fields */
.custom-owner-fields {
    padding-top: 0.5rem;
}

/* Ivory Count Display */
.ivory-count-display {
    padding: 0.65rem 0.85rem;
    background: #faf8f5;
    border-radius: 6px;
    border: 1px solid #ece8e1;
    font-size: 0.88rem;
    color: #5D4037;
}

/* Serial Lookup Result */
.serial-lookup-result {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin: 0.5rem 0;
}

.serial-lookup-result.success {
    background: #f5faf5;
    color: #4a6a4a;
    border: 1px solid #d5e5d5;
}

.serial-lookup-result.info {
    background: #faf8f5;
    color: #6D4C41;
    border: 1px solid #ece8e1;
}

/* Antique Warning */
.antique-warning {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin: 0.5rem 0;
}

.antique-warning.success {
    background: #f5faf5;
    color: #4a6a4a;
    border: 1px solid #d5e5d5;
}

.antique-warning.warning {
    background: #faf8f2;
    color: #7a6530;
    border: 1px solid #e5dcc8;
}

.antique-warning.danger {
    background: #faf5f5;
    color: #7a4040;
    border: 1px solid #e5d0d0;
}

/* Step Buttons */
.step-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #ece8e1;
}

.btn-primary {
    background: #f0ece6;
    color: #3E2723;
    border: 1px solid #d5cec4;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    font-family: var(--body-font);
}

.btn-primary:hover {
    background: #e8e2d9;
    border-color: #8D6E63;
}

.btn-primary:disabled {
    background: #aaa;
    cursor: not-allowed;
}

.btn-secondary {
    background: #faf8f5;
    color: #5D4037;
    border: 1px solid #ece8e1;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    font-family: var(--body-font);
}

.btn-secondary:hover {
    background: #f5f2ed;
}

.btn-pay {
    padding: 0.85rem 2rem;
    font-size: 1rem;
}

/* Photo Upload */
.photo-upload-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.photo-upload-grid.extra {
    grid-template-columns: 1fr;
    max-width: 300px;
}

.photo-upload-card {
    position: relative;
}

.photo-upload-card.required .upload-preview::after {
    content: 'Verplicht';
    position: absolute;
    top: 6px;
    right: 6px;
    background: #b88a8a;
    color: white;
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
}

.photo-upload-card input[type="file"] {
    display: none;
}

.upload-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    border: 1px dashed #d5cfc5;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    cursor: pointer;
    transition: all 0.2s;
    background: #faf8f5;
    text-align: center;
    padding: 0.5rem;
    overflow: hidden;
}

.upload-preview:hover {
    border-color: #5D4037;
    background: #f5f0eb;
}

.upload-preview.has-image {
    border-style: solid;
    border-color: #8aab8a;
    padding: 0;
    position: relative;
}

.upload-preview.has-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.upload-icon {
    font-size: 2rem;
}

.upload-preview span {
    font-size: 0.8rem;
    color: #a09080;
    font-weight: 500;
}

.upload-preview small {
    font-size: 0.7rem;
    color: #b0a090;
}

.extra-photos-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.extra-photos-section h3 {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    color: #3E2723;
}

.extra-photos-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

.extra-photo-preview {
    aspect-ratio: 4/3;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #8aab8a;
}

.extra-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Review Section (Stap 5) */
.review-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.review-block {
    background: #faf8f5;
    padding: 1.25rem;
    border-radius: 6px;
    position: relative;
    border: 1px solid #ece8e1;
}

.review-block h3 {
    color: #3E2723;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #ece8e1;
}

.review-block .btn-edit {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.3rem 0.7rem;
    font-size: 0.78rem;
    background: transparent;
    border: 1px solid #ece8e1;
    border-radius: 5px;
    cursor: pointer;
    color: #6D4C41;
    font-family: var(--body-font);
}

.review-block .btn-edit:hover {
    background: #faf8f5;
}

.review-data {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.review-row {
    display: flex;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.review-row span {
    color: #a09080;
    min-width: 140px;
}

.review-row strong {
    color: #5D4037;
}

.review-row.total {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 2px solid #5D4037;
    font-size: 1.1rem;
}

.review-row.total span,
.review-row.total strong {
    color: #5D4037;
}

.review-block.pricing {
    background: #faf8f5;
    border: 1px solid #ece8e1;
}

.review-photos {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Payment Status (Stap 6) */
.payment-status {
    text-align: center;
    padding: 3rem 2rem;
}

.payment-status .status-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.payment-status h3 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

.payment-status.pending h3 {
    color: #856404;
}

.payment-status.success h3 {
    color: #155724;
}

.payment-status.failed h3 {
    color: #721c24;
}

.payment-status p {
    color: #5D4037;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.btn-download {
    padding: 0.85rem 2.5rem;
    font-size: 1.1rem;
}

.download-note {
    font-size: 0.8rem !important;
    color: #999 !important;
    margin-top: 1rem !important;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 2rem;
    color: #a09080;
}

.error-text {
    color: #dc3545;
    text-align: center;
    padding: 1rem;
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
}

.autocomplete-item {
    padding: 0.6rem 0.85rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.15s;
}

.autocomplete-item:hover {
    background: #f5f0eb;
    color: #5D4037;
}

/* Responsive */
@media (max-width: 768px) {
    .cites-form .form-row {
        grid-template-columns: 1fr;
    }

    .photo-upload-grid {
        grid-template-columns: 1fr;
    }

    .extra-photos-preview {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps-indicator {
        gap: 0;
    }

    .step-dot {
        min-width: 45px;
    }

    .step-dot small {
        font-size: 0.6rem;
    }

    .step-line {
        width: 15px;
    }

    .declaration-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .declaration-actions {
        width: 100%;
    }

    .review-row {
        flex-direction: column;
        gap: 0.15rem;
    }

    .review-row span {
        min-width: unset;
        font-size: 0.8rem;
    }

    .wizard-step {
        padding: 1.25rem;
    }

    .cites-tabs {
        flex-wrap: wrap;
    }
}
