/**
 * Vacature Poster Editor — Frontend stijlen
 *
 * Atisuto Creative design — iOS-stijl kaarten met Inter font
 * https://www.atisuto.nl/apps-en-plugins/
 */

/* ============================================================
   Basis
   ============================================================ */
.atisuto-poster-editor * {
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.atisuto-poster-editor {
    max-width: 1100px;
    margin: 0 auto;
}

/* ============================================================
   Layout: canvas links, controls rechts
   ============================================================ */
.poster-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.poster-canvas-wrap {
    flex: 0 0 auto;
    width: 423px;
    position: sticky;
    top: 20px;
}

.poster-canvas-wrap .canvas-container {
    box-shadow: 3px 3px 7px #dbdbdd;
    border-radius: 20px;
    overflow: hidden;
}

.poster-canvas-wrap canvas {
    border-radius: 20px;
}

.poster-controls {
    flex: 1;
    min-width: 280px;
}

/* ============================================================
   Kaarten
   ============================================================ */
.poster-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 3px 3px 7px #dbdbdd;
    padding: 20px;
    margin-bottom: 16px;
}

.poster-card h3 {
    margin: 0 0 14px 0;
    font-size: 17px;
    font-weight: 600;
    color: #198fd9;
}

/* ============================================================
   Formulier velden
   ============================================================ */
.poster-field {
    margin-bottom: 12px;
}

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

.poster-field label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
}

.poster-field input[type="text"],
.poster-field input[type="url"],
.poster-field input[type="email"],
.poster-field textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    background: #fff;
}

.poster-field input:focus,
.poster-field textarea:focus {
    border-color: #198fd9;
    box-shadow: 0 0 0 3px rgba(25, 143, 217, 0.12);
}

.poster-field textarea {
    min-height: 90px;
    resize: vertical;
    border-radius: 16px;
}

/* ============================================================
   Upload knoppen (gradient, Atisuto-stijl)
   ============================================================ */
.poster-field input[type="file"] {
    display: none;
}

.poster-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    background: linear-gradient(to right, #198fd9, #e263c8);
    color: #fff !important;
    border: none;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    box-shadow: 3px 3px 7px #dbdbdd;
    transition: transform 0.15s, box-shadow 0.15s;
}

.poster-upload-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(255, 255, 255, 0.35);
}

.poster-upload-btn:active {
    transform: translateY(0);
}

.poster-upload-name {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================
   Sliders
   ============================================================ */
.poster-field input[type="range"] {
    width: 100%;
    accent-color: #198fd9;
}

.slider-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider-row input[type="range"] {
    flex: 1;
}

.slider-value {
    min-width: 42px;
    text-align: right;
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

/* ============================================================
   Character counter
   ============================================================ */
.poster-char-counter {
    display: flex;
    justify-content: flex-end;
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.poster-char-counter.over-limit {
    color: #e53935;
    font-weight: 600;
}

.poster-overflow-warning {
    font-size: 13px;
    color: #e53935;
    font-weight: 600;
    margin-top: 4px;
}

/* ============================================================
   Layout toggle (radio buttons)
   ============================================================ */
.poster-layout-toggle {
    display: flex;
    gap: 0;
    background: #f5f5f5;
    border-radius: 16px;
    padding: 4px;
}

.poster-toggle-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.poster-toggle-option input[type="radio"] {
    display: none;
}

.poster-toggle-option.active {
    background: linear-gradient(to right, #198fd9, #e263c8);
    color: #fff;
    box-shadow: 0 2px 8px rgba(25, 143, 217, 0.3);
}

.poster-toggle-option:not(.active):hover {
    color: #198fd9;
    background: #eee;
}

/* ============================================================
   Disabled velden (uitgebreide tekst modus)
   ============================================================ */
.poster-field-disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ============================================================
   Grid en knoppen
   ============================================================ */
.poster-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.poster-btn-row {
    display: flex;
    gap: 12px;
}

.poster-btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.poster-btn:hover {
    transform: translateY(-1px);
    box-shadow: 3px 5px 10px #dbdbdd;
}

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

.poster-btn-primary {
    background: linear-gradient(to right, #198fd9, #e263c8);
    color: #fff;
    box-shadow: 3px 3px 7px #dbdbdd;
}

.poster-btn-secondary {
    background: #fff;
    color: #198fd9;
    box-shadow: 3px 3px 7px #dbdbdd;
    border: 1px solid #e0e0e0;
}

/* ============================================================
   Hint tekst
   ============================================================ */
.poster-drag-hint {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 860px) {
    .poster-layout {
        flex-direction: column;
    }
    .poster-canvas-wrap {
        flex: none;
        width: 100%;
        max-width: 423px;
        position: static;
    }
}

@media (min-width: 1200px) {
    .poster-canvas-wrap {
        width: 500px;
    }
}
