/* ═══════════════════════════════════════════════════════════════
   Easy Co – Beitrag einreichen | Frontend Styles
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&family=Space+Mono:wght@400;700&display=swap');

:root {
    --ecb-green: #22c55e;
    --ecb-green-dark: #16a34a;
    --ecb-green-light: #dcfce7;
    --ecb-green-muted: #f0fdf4;
    --ecb-dark: #1a1a2e;
    --ecb-gray: #64748b;
    --ecb-gray-light: #e2e8f0;
    --ecb-gray-lighter: #f8fafc;
    --ecb-white: #ffffff;
    --ecb-red: #ef4444;
    --ecb-red-light: #fef2f2;
    --ecb-amber: #f59e0b;
    --ecb-amber-light: #fffbeb;
    --ecb-blue: #3b82f6;
    --ecb-blue-light: #eff6ff;
    --ecb-radius: 12px;
    --ecb-radius-lg: 16px;
}

.ecb-wrapper {
    max-width: 720px;
    margin: 0 auto;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--ecb-dark);
    line-height: 1.6;
}

.ecb-wrapper * {
    box-sizing: border-box;
}

/* ─── Tabs ─── */
.ecb-tabs {
    display: flex;
    gap: 6px;
    padding: 6px;
    background: var(--ecb-gray-lighter);
    border-radius: var(--ecb-radius-lg);
    margin-bottom: 28px;
}

.ecb-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border: none;
    background: none;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    color: var(--ecb-gray);
    border-radius: var(--ecb-radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.ecb-tab:hover {
    background: rgba(0, 0, 0, 0.03);
}

.ecb-tab.active {
    background: var(--ecb-white);
    color: var(--ecb-dark);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ─── Cards ─── */
.ecb-card {
    background: var(--ecb-white);
    border-radius: var(--ecb-radius-lg);
    padding: 28px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--ecb-gray-light);
    margin-bottom: 20px;
}

.ecb-card h3 {
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 600;
    color: var(--ecb-dark);
}

.ecb-hint {
    font-size: 14px;
    font-weight: 400;
    color: var(--ecb-gray);
}

/* ─── Info & Warning Boxes ─── */
.ecb-info-box {
    background: var(--ecb-blue-light);
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #1e40af;
    line-height: 1.7;
}

.ecb-warning-box {
    background: var(--ecb-amber-light);
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 14px;
    font-size: 13px;
    color: #92400e;
    line-height: 1.6;
    margin-top: 16px;
}

.ecb-warning-box code {
    background: rgba(0, 0, 0, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-family: 'Space Mono', monospace;
}

/* ─── Form Fields ─── */
.ecb-field {
    margin-bottom: 16px;
}

.ecb-field:last-child {
    margin-bottom: 0;
}

.ecb-field-hint {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--ecb-gray);
    line-height: 1.4;
}

.ecb-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ecb-gray);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ecb-field input,
.ecb-field select,
.ecb-field textarea {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid var(--ecb-gray-light);
    border-radius: var(--ecb-radius);
    font-size: 15px;
    font-family: inherit;
    background: var(--ecb-white);
    transition: all 0.2s ease;
    color: var(--ecb-dark);
}

.ecb-field input:focus,
.ecb-field select:focus,
.ecb-field textarea:focus {
    outline: none;
    border-color: var(--ecb-green);
    box-shadow: 0 0 0 3px var(--ecb-green-light);
}

.ecb-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

@media (max-width: 600px) {
    .ecb-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* ─── Drop Zone ─── */
.ecb-drop-zone {
    border: 2px dashed var(--ecb-gray-light);
    border-radius: var(--ecb-radius-lg);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--ecb-gray-lighter);
}

.ecb-drop-zone:hover,
.ecb-drop-zone.dragover {
    border-color: var(--ecb-green);
    background: var(--ecb-green-muted);
}

.ecb-drop-zone-small {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: var(--ecb-gray);
}

.ecb-drop-title {
    margin: 10px 0 4px;
    font-weight: 600;
    color: var(--ecb-dark);
}

.ecb-drop-hint {
    margin: 0;
    font-size: 13px;
    color: var(--ecb-gray);
}

/* ─── File Preview ─── */
.ecb-file-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--ecb-green-muted);
    border: 1px solid var(--ecb-green-light);
    border-radius: var(--ecb-radius);
}

.ecb-file-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ecb-file-name {
    display: block;
    font-weight: 600;
    color: var(--ecb-dark);
    font-size: 15px;
}

.ecb-file-size {
    display: block;
    font-size: 13px;
    color: var(--ecb-gray);
    margin-top: 2px;
}

.ecb-file-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ecb-red);
    font-size: 18px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.ecb-file-remove:hover {
    background: var(--ecb-red-light);
}

/* ─── Image Grid ─── */
.ecb-image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.ecb-image-grid:empty {
    display: none;
    margin-bottom: 0;
}

.ecb-image-thumb {
    position: relative;
    border-radius: var(--ecb-radius);
    overflow: hidden;
    aspect-ratio: 4/3;
    border: 1px solid var(--ecb-gray-light);
}

.ecb-image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ecb-image-thumb .ecb-img-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.2s;
}

.ecb-image-thumb .ecb-img-remove:hover {
    background: var(--ecb-red);
}

/* ─── Checkbox ─── */
.ecb-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    color: var(--ecb-gray);
    line-height: 1.5;
}

.ecb-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: var(--ecb-green);
}

/* ─── Submit Button ─── */
.ecb-submit-btn {
    width: 100%;
    padding: 16px 32px;
    background: var(--ecb-green);
    color: white;
    border: none;
    border-radius: var(--ecb-radius);
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.ecb-submit-btn:hover:not(:disabled) {
    background: var(--ecb-green-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.ecb-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ─── Spinner ─── */
@keyframes ecb-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.ecb-spinner {
    animation: ecb-spin 1s linear infinite;
}

/* ─── Processing Log ─── */
.ecb-processing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.ecb-processing-header h3 {
    margin: 0;
    font-size: 20px;
}

.ecb-log {
    background: var(--ecb-dark);
    border-radius: var(--ecb-radius);
    padding: 20px;
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    max-height: 400px;
    overflow-y: auto;
    line-height: 1.8;
}

.ecb-log-entry {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-bottom: 4px;
    animation: ecb-fadeIn 0.3s ease-out;
}

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

.ecb-log-time {
    color: #475569;
    flex-shrink: 0;
    font-size: 11px;
}

.ecb-log-msg { color: #94a3b8; }
.ecb-log-msg.success { color: #22c55e; }
.ecb-log-msg.error { color: #ef4444; }
.ecb-log-msg.warning { color: #f59e0b; }
.ecb-log-msg.heading { color: #ffffff; font-weight: 700; }

.ecb-log-cursor {
    color: var(--ecb-green);
    animation: ecb-pulse 1.5s infinite;
}

@keyframes ecb-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ─── Backlink Result ─── */
.ecb-backlink-result {
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.ecb-backlink-result.verified {
    background: var(--ecb-green-muted);
    border: 1px solid var(--ecb-green-light);
    color: #166534;
}

.ecb-backlink-result.missing {
    background: var(--ecb-red-light);
    border: 1px solid #fecaca;
    color: #991b1b;
}

.ecb-backlink-result strong {
    display: block;
    margin-bottom: 4px;
}

/* ─── Result Grid ─── */
.ecb-result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.ecb-result-item {
    background: var(--ecb-gray-lighter);
    border-radius: 10px;
    padding: 12px;
}

.ecb-result-item .label {
    font-size: 11px;
    color: var(--ecb-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.ecb-result-item .value {
    font-size: 14px;
    font-weight: 600;
    color: var(--ecb-dark);
}

/* ─── Action Buttons ─── */
.ecb-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.ecb-btn-secondary {
    flex: 1;
    padding: 14px 24px;
    background: var(--ecb-white);
    color: var(--ecb-dark);
    border: 2px solid var(--ecb-gray-light);
    border-radius: var(--ecb-radius);
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.ecb-btn-secondary:hover {
    border-color: var(--ecb-green);
    color: var(--ecb-green);
}

/* ─── Error Message ─── */
.ecb-error {
    background: var(--ecb-red-light);
    border: 1px solid #fecaca;
    border-radius: 14px;
    padding: 14px 18px;
    margin-top: 16px;
    display: flex;
    gap: 10px;
    align-items: center;
    color: #991b1b;
    font-size: 14px;
}

/* ─── Success Message ─── */
.ecb-success-banner {
    background: var(--ecb-green-muted);
    border: 1px solid var(--ecb-green-light);
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.ecb-success-banner h3 {
    color: var(--ecb-green-dark);
    margin: 0 0 8px;
    font-size: 20px;
}

.ecb-success-banner p {
    color: #166534;
    margin: 0;
    font-size: 15px;
}

/* ─── Responsive ─── */
@media (max-width: 600px) {
    .ecb-tabs {
        flex-direction: column;
    }

    .ecb-card {
        padding: 20px;
    }

    .ecb-result-grid {
        grid-template-columns: 1fr;
    }

    .ecb-image-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ═══ Subscribe/Unsubscribe Pages ═══ */

.ecb-subscribe-page {
    max-width: 600px;
    margin: 0 auto;
}

.ecb-subscribe-hero {
    text-align: center;
    padding: 40px 30px !important;
}

.ecb-subscribe-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.ecb-subscribe-hero h2 {
    color: var(--ecb-dark);
    font-size: 26px;
    margin: 0 0 12px;
}

.ecb-subscribe-hero p {
    color: var(--ecb-gray);
    font-size: 16px;
    line-height: 1.6;
    max-width: 420px;
    margin: 0 auto;
}

.ecb-subscribe-benefits {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ecb-benefit {
    display: flex;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid #f1f5f9;
    align-items: flex-start;
}

.ecb-benefit:last-child {
    border-bottom: none;
}

.ecb-benefit-icon {
    font-size: 28px;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: #f0fdf4;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ecb-benefit strong {
    display: block;
    color: var(--ecb-dark);
    font-size: 15px;
    margin-bottom: 4px;
}

.ecb-benefit p {
    color: var(--ecb-gray);
    font-size: 13px;
    margin: 0;
    line-height: 1.5;
}

.ecb-success-card {
    text-align: center;
    padding: 32px 20px;
}

.ecb-success-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.ecb-success-card h3 {
    color: var(--ecb-dark);
    font-size: 22px;
    margin: 0 0 12px;
}

.ecb-success-card p {
    color: var(--ecb-gray);
    font-size: 15px;
    line-height: 1.6;
    max-width: 380px;
    margin: 0 auto;
}

.ecb-btn-muted {
    background: #e2e8f0 !important;
    color: #475569 !important;
}

.ecb-btn-muted:hover {
    background: #cbd5e1 !important;
}

/* ═══ Backlink Target Suggestion Box ═══ */

.ecb-backlink-target-box {
    margin-top: 16px;
    border-radius: 12px;
    overflow: hidden;
}

.ecb-bl-default {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 16px 20px;
    color: #92400e;
    font-size: 14px;
    line-height: 1.6;
}

.ecb-bl-suggested {
    background: #f0fdf4;
    border: 2px solid #22c55e;
    border-radius: 12px;
    padding: 20px;
}

.ecb-bl-suggested-header {
    font-size: 14px;
    color: #166534;
    margin-bottom: 12px;
}

.ecb-bl-suggested-link {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    border: 1px solid #dcfce7;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.ecb-bl-suggested-link a {
    flex: 1;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ecb-bl-suggested-link a span {
    color: #1a1a2e;
    font-weight: 600;
    font-size: 15px;
}

.ecb-bl-suggested-link a small {
    color: #22c55e;
    font-size: 12px;
    word-break: break-all;
}

.ecb-copy-link {
    flex-shrink: 0;
    background: #f0fdf4;
    border: 1px solid #dcfce7;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.ecb-copy-link:hover {
    background: #dcfce7;
}

.ecb-copy-link.copied {
    background: #22c55e;
    color: white;
    border-color: #22c55e;
}

.ecb-bl-hint {
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
    margin: 0;
}
