/* Megkeresések – frontend űrlap [ajanlatkeres]
   Robusztus, téma-független stílus (a WP témák felülírásai ellen scope-olt
   szabályok + reset). Minden szabály a .cp-mk-form-wrap alá van zárva. */

.cp-mk-form-wrap,
.cp-mk-form-wrap * {
    box-sizing: border-box;
}

.cp-mk-form-wrap {
    max-width: 640px;
    margin: 0 auto;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: #1e293b;
    line-height: 1.5;
}

/* ─── Tabok (lépkedő) ─── */
.cp-mk-form-wrap .cp-mk-tabs {
    display: flex;
    gap: 6px;
    margin: 0 0 20px;
    background: #eef2f7;
    padding: 5px;
    border-radius: 14px;
}

.cp-mk-form-wrap .cp-mk-tab {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    margin: 0;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 15px;
    line-height: 1.2;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    text-align: center;
    box-shadow: none;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.cp-mk-form-wrap .cp-mk-tab:hover {
    color: #4c1d95;
}

.cp-mk-form-wrap .cp-mk-tab.is-active {
    background: #fff;
    color: #6d28d9;
    box-shadow: 0 2px 6px rgba(79, 30, 138, .14);
}

/* ─── Form doboz ─── */
.cp-mk-form-wrap .cp-mk-form {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 26px;
    box-shadow: 0 6px 28px rgba(15, 23, 42, .07);
}

.cp-mk-form-wrap .cp-mk-field {
    margin: 0 0 16px;
}

.cp-mk-form-wrap .cp-mk-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 6px;
    color: #475569;
    line-height: 1.3;
}

.cp-mk-form-wrap .cp-mk-field .req {
    color: #dc2626;
}

/* Egységes input/select/textarea reset + stílus */
.cp-mk-form-wrap .cp-mk-field input[type="text"],
.cp-mk-form-wrap .cp-mk-field input[type="email"],
.cp-mk-form-wrap .cp-mk-field input[type="tel"],
.cp-mk-form-wrap .cp-mk-field input[type="number"],
.cp-mk-form-wrap .cp-mk-field select,
.cp-mk-form-wrap .cp-mk-field textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 46px;
    margin: 0;
    padding: 11px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background-color: #fff;
    color: #1e293b;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.4;
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.cp-mk-form-wrap .cp-mk-field textarea {
    min-height: 96px;
    resize: vertical;
}

/* Select: saját nyíl + appearance reset (téma-független megjelenés) */
.cp-mk-form-wrap .cp-mk-field select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 40px;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'14'%20height%3D'9'%20viewBox%3D'0%200%2014%209'%3E%3Cpath%20fill%3D'none'%20stroke%3D'%2364748b'%20stroke-width%3D'2'%20d%3D'M1%201l6%206%206-6'%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px 9px;
    cursor: pointer;
    text-overflow: ellipsis;
}

.cp-mk-form-wrap .cp-mk-field input:focus,
.cp-mk-form-wrap .cp-mk-field select:focus,
.cp-mk-form-wrap .cp-mk-field textarea:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, .15);
}

.cp-mk-form-wrap .cp-mk-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.cp-mk-form-wrap .cp-mk-hint {
    font-size: 12px;
    color: #94a3b8;
    margin: 6px 0 0;
    line-height: 1.4;
}

.cp-mk-form-wrap .cp-mk-file-list {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    font-size: 13px;
    color: #64748b;
}

.cp-mk-form-wrap .cp-mk-file-list li {
    padding: 3px 0;
}

/* ─── Jogi rész + checkbox ─── */
.cp-mk-form-wrap .cp-mk-legal {
    margin: 20px 0;
    padding: 16px 18px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.cp-mk-form-wrap .cp-mk-check {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: flex-start;
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    cursor: pointer;
    color: #334155;
}

.cp-mk-form-wrap .cp-mk-check input[type="checkbox"] {
    -webkit-appearance: auto;
    appearance: auto;
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 2px 0 0;
    flex: 0 0 18px;
    cursor: pointer;
}

.cp-mk-form-wrap .cp-mk-check > span {
    flex: 1 1 auto;
    display: block;
}

.cp-mk-form-wrap .cp-mk-check a {
    color: #6d28d9;
    text-decoration: underline;
}

.cp-mk-form-wrap .cp-mk-legal-note {
    margin: 12px 0 0;
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}

/* ─── Gomb ─── */
.cp-mk-form-wrap .cp-mk-actions {
    margin-top: 6px;
}

.cp-mk-form-wrap .cp-mk-submit {
    display: block;
    width: 100%;
    margin: 0;
    padding: 15px 24px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: opacity .15s ease, transform .08s ease;
}

.cp-mk-form-wrap .cp-mk-submit:hover:not(:disabled) {
    opacity: .93;
}

.cp-mk-form-wrap .cp-mk-submit:active:not(:disabled) {
    transform: translateY(1px);
}

.cp-mk-form-wrap .cp-mk-submit:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* ─── Üzenetek ─── */
.cp-mk-form-wrap .cp-mk-message {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
}

.cp-mk-form-wrap .cp-mk-message.is-success {
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.cp-mk-form-wrap .cp-mk-message.is-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* ─── Sikeres beküldés képernyő (űrlap eltűnik) ─── */
.cp-mk-form-wrap .cp-mk-success-screen {
    background: #fff;
    border: 1px solid #bbf7d0;
    border-radius: 16px;
    padding: 40px 28px;
    text-align: center;
    box-shadow: 0 6px 28px rgba(15, 23, 42, .07);
}

.cp-mk-form-wrap .cp-mk-success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cp-mk-form-wrap .cp-mk-success-icon svg {
    width: 34px;
    height: 34px;
    stroke: #fff;
}

.cp-mk-form-wrap .cp-mk-success-title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    color: #15803d;
}

.cp-mk-form-wrap .cp-mk-success-text {
    margin: 0;
    font-size: 15px;
    color: #475569;
    line-height: 1.6;
}

.cp-mk-form-wrap .cp-mk-field.is-invalid input,
.cp-mk-form-wrap .cp-mk-field.is-invalid select,
.cp-mk-form-wrap .cp-mk-field.is-invalid textarea {
    border-color: #dc2626;
}

/* ─── Mobil optimalizálás ─── */
@media (max-width: 600px) {
    .cp-mk-form-wrap .cp-mk-form {
        padding: 18px 16px;
        border-radius: 14px;
    }
    .cp-mk-form-wrap .cp-mk-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .cp-mk-form-wrap .cp-mk-tabs {
        gap: 4px;
        padding: 4px;
    }
    .cp-mk-form-wrap .cp-mk-tab {
        padding: 11px 8px;
        font-size: 14px;
    }
    .cp-mk-form-wrap .cp-mk-field input[type="text"],
    .cp-mk-form-wrap .cp-mk-field input[type="email"],
    .cp-mk-form-wrap .cp-mk-field input[type="tel"],
    .cp-mk-form-wrap .cp-mk-field input[type="number"],
    .cp-mk-form-wrap .cp-mk-field select,
    .cp-mk-form-wrap .cp-mk-field textarea {
        font-size: 16px; /* iOS: ne zoom-oljon fókuszkor */
        min-height: 48px;
    }
    .cp-mk-form-wrap .cp-mk-legal {
        padding: 14px;
    }
    .cp-mk-form-wrap .cp-mk-success-screen {
        padding: 32px 18px;
    }
}
