/**
 * Advertentieplaatser Frontend Styles
 */

/* Container */
.advpl-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Typography */
.advpl-container h1,
.advpl-container h2,
.advpl-container h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.advpl-container h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

.advpl-container h2 {
    font-size: 2rem;
    font-weight: 600;
}

.advpl-container h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

.advpl-container p {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Buttons */
.advpl-btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.5;
}

.advpl-btn-primary {
    background: #3b82f6;
    color: white;
}

.advpl-btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.advpl-btn-secondary {
    background: #64748b;
    color: white;
}

.advpl-btn-secondary:hover {
    background: #475569;
}

.advpl-btn-success {
    background: #10b981;
    color: white;
}

.advpl-btn-success:hover {
    background: #059669;
}

.advpl-btn-danger {
    background: #ef4444;
    color: white;
}

.advpl-btn-danger:hover {
    background: #dc2626;
}

.advpl-btn-large {
    padding: 16px 32px;
    font-size: 1.125rem;
}

.advpl-btn-small {
    padding: 8px 16px;
    font-size: 0.875rem;
}

/* Forms */
.advpl-register-page,
.advpl-login-page {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.advpl-register-header,
.advpl-login-header {
    text-align: center;
    margin-bottom: 30px;
}

.advpl-register-header h1,
.advpl-login-header h1 {
    margin-bottom: 0.5rem;
}

.advpl-register-header p,
.advpl-login-header p {
    font-size: 1.125rem;
}

.advpl-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.advpl-form-group {
    display: flex;
    flex-direction: column;
}

.advpl-form-group label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    font-size: 0.875rem;
}

.advpl-form-group input,
.advpl-form-group textarea,
.advpl-form-group select {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
}

.advpl-form-group input:focus,
.advpl-form-group textarea:focus,
.advpl-form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.advpl-form-group input:invalid,
.advpl-form-group textarea:invalid {
    border-color: #ef4444;
}

.advpl-form-group small {
    color: #64748b;
    font-size: 0.75rem;
    margin-top: 4px;
}

.advpl-error-field {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* Password strength indicator */
.advpl-password-strength {
    margin-top: 6px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.advpl-password-strength.zeer-zwak {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.advpl-password-strength.zwak {
    background: #fef3c7;
    color: #d97706;
    border: 1px solid #fed7aa;
}

.advpl-password-strength.redelijk {
    background: #fef3c7;
    color: #ca8a04;
    border: 1px solid #fde68a;
}

.advpl-password-strength.sterk {
    background: #d1fae5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.advpl-password-strength.zeer-sterk {
    background: #dcfdf7;
    color: #047857;
    border: 1px solid #6ee7b7;
}

/* CAPTCHA */
.advpl-captcha-group {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin: 20px 0;
}

.advpl-captcha-question {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    margin: 8px 0 12px 0;
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    text-align: center;
}

/* Honeypot (hidden) */
.advpl-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Form actions */
.advpl-form-actions {
    margin-top: 30px;
    text-align: center;
}

.advpl-form-footer {
    margin-top: 20px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.advpl-form-footer a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.advpl-form-footer a:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* Messages */
.advpl-success-message {
    background: #dcfdf7;
    border: 1px solid #6ee7b7;
    color: #047857;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.advpl-success-message h3 {
    color: #047857;
    margin-bottom: 10px;
}

.advpl-error-messages {
    margin-bottom: 20px;
}

.advpl-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-weight: 500;
}

.advpl-warning {
    background: #fffbeb;
    border: 1px solid #fed7aa;
    color: #d97706;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 8px;
}

.advpl-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #2563eb;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 8px;
}

/* Photo Upload Styles */
.advpl-photo-upload {
    margin: 20px 0;
}

.advpl-upload-dropzone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.advpl-upload-dropzone:hover,
.advpl-upload-dropzone.advpl-dragover {
    border-color: var(--advpl-primary);
    background: #f0f8ff;
}

.advpl-upload-content h3 {
    margin: 10px 0;
    color: #333;
}

.advpl-upload-content p {
    color: #666;
    margin-bottom: 20px;
}

.advpl-upload-icon {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 10px;
}

.advpl-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.advpl-photo-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.advpl-photo-item.advpl-uploading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 150px;
}

.advpl-photo-preview {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

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

.advpl-photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.advpl-photo-item:hover .advpl-photo-overlay {
    opacity: 1;
}

.advpl-photo-action {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.advpl-photo-action:hover {
    background: #fff;
    transform: scale(1.1);
}

.advpl-photo-action.active {
    background: var(--advpl-primary);
    color: #fff;
}

.advpl-primary-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--advpl-primary);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.advpl-photo-handle {
    padding: 8px;
    text-align: center;
    background: #f8f9fa;
    cursor: move;
}

.advpl-upload-progress {
    width: 100%;
    max-width: 200px;
}

.advpl-progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.advpl-progress-fill {
    height: 100%;
    background: var(--advpl-primary);
    transition: width 0.3s ease;
}

.advpl-progress-text {
    font-size: 14px;
    text-align: center;
    color: #666;
}

/* Gallery Modal */
.advpl-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.advpl-modal-content {
    max-width: 90vw;
    max-height: 90vh;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.advpl-modal-header {
    padding: 20px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.advpl-modal-header h3 {
    margin: 0;
    color: #333;
}

.advpl-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.advpl-modal-close:hover {
    color: #333;
}

.advpl-modal-body {
    padding: 0;
}

.advpl-gallery-viewer {
    position: relative;
    display: flex;
    align-items: center;
}

.advpl-gallery-main-modal {
    max-width: 800px;
    max-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.advpl-gallery-main-modal img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.advpl-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: background 0.3s ease;
}

.advpl-gallery-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.advpl-gallery-prev {
    left: 20px;
}

.advpl-gallery-next {
    right: 20px;
}

.advpl-gallery-counter {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    color: #666;
    font-size: 14px;
}

/* Dashboard Styles */
.advpl-dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.advpl-dashboard-welcome h1 {
    margin: 0 0 8px 0;
    color: #333;
}

.advpl-dashboard-actions {
    display: flex;
    gap: 15px;
}

.advpl-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.advpl-stat-card {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
}

.advpl-stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
}

.advpl-stat-icon-total {
    background: #6c757d;
}

.advpl-stat-icon-active {
    background: #28a745;
}

.advpl-stat-icon-draft {
    background: #ffc107;
}

.advpl-stat-icon-views {
    background: #17a2b8;
}

.advpl-stat-number {
    font-size: 36px;
    font-weight: bold;
    color: #333;
    line-height: 1;
}

.advpl-stat-label {
    color: #666;
    font-size: 14px;
    margin-top: 4px;
}

.advpl-filter-tabs {
    display: flex;
    gap: 5px;
}

.advpl-filter-tab {
    background: none;
    border: 1px solid #dee2e6;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.advpl-filter-tab.active,
.advpl-filter-tab:hover {
    background: var(--advpl-primary);
    color: #fff;
    border-color: var(--advpl-primary);
}

.advpl-ad-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

.advpl-ad-image {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.advpl-ad-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.advpl-ad-no-image {
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 32px;
}

.advpl-ad-content {
    flex: 1;
    min-width: 0;
}

.advpl-ad-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 10px;
}

.advpl-ad-title {
    margin: 0;
    font-size: 18px;
}

.advpl-ad-title a {
    color: #333;
    text-decoration: none;
}

.advpl-ad-title a:hover {
    color: var(--advpl-primary);
}

.advpl-ad-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    white-space: nowrap;
}

.advpl-status-active {
    background: #d4edda;
    color: #155724;
}

.advpl-status-draft {
    background: #fff3cd;
    color: #856404;
}

.advpl-ad-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.advpl-ad-description {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.advpl-ad-stats {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #888;
}

.advpl-stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

.advpl-ad-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .advpl-container {
        padding: 0 15px;
    }

    .advpl-card {
        margin: 20px 0;
        padding: 20px;
    }

    .advpl-form-row {
        flex-direction: column;
    }

    .advpl-form-group {
        margin-bottom: 20px;
    }

    .advpl-ads-grid {
        grid-template-columns: 1fr;
    }

    .advpl-search-filters {
        flex-direction: column;
        gap: 15px;
    }

    .advpl-filter-group {
        width: 100%;
    }

    .advpl-pagination {
        flex-wrap: wrap;
        gap: 10px;
    }

    .advpl-dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .advpl-stats-grid {
        grid-template-columns: 1fr;
    }

    .advpl-ad-item {
        flex-direction: column;
    }

    .advpl-ad-image {
        width: 100%;
        height: 200px;
    }

    .advpl-ad-actions {
        flex-direction: row;
        justify-content: space-between;
    }

    .advpl-photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }

    .advpl-modal-content {
        max-width: 95vw;
        max-height: 95vh;
    }

    .advpl-gallery-nav {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {

    .advpl-register-page,
    .advpl-login-page {
        padding: 15px;
    }

    .advpl-form-group input,
    .advpl-form-group textarea,
    .advpl-form-group select {
        padding: 10px 12px;
    }

    .advpl-captcha-group {
        padding: 15px;
    }
}