/**
 * Quick Account Drawer · front
 * Καθαρό συρτάρι: τίτλος + ×, πεδία-κουτιά, κουμπί γκρι/ανενεργό μέχρι να είναι σωστά τα πεδία,
 * σύνδεσμοι στο κέντρο, διαχωριστικό «ή».
 *
 * @author    codePresta.com
 * @copyright codePresta.com
 */
.qap {
    --qap-primary: var(--cp-primary, #1c3673);
    --qap-text: #2e2e2e;
    --qap-muted: #6b6b6b;
    --qap-border: #8c8c8c;
    --qap-link: #0b5cad;
    --qap-danger: #d0103a;
    position: fixed;
    inset: 0;
    z-index: 1300;
    font-size: 15px;
    color: var(--qap-text);
}

.qap[hidden],
.qap-view[hidden] {
    display: none;
}

/* μόνο το html: με body { overflow:hidden } (το theme δίνει height:100%) η σελίδα γύριζε στην αρχή */
html.qap-lock {
    overflow: hidden;
}

.qap-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .5);
    opacity: 0;
    transition: opacity .3s ease;
}

.qap-drawer {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(490px, calc(100vw - 24px));
    overflow-y: auto;
    border-radius: 16px 0 0 16px;
    background: #fff;
    box-shadow: -14px 0 40px rgba(15, 23, 42, .2);
    transform: translateX(100%);
    transition: transform .32s cubic-bezier(.22, .8, .3, 1);
    outline: 0;
}

.qap.is-open .qap-overlay {
    opacity: 1;
}

.qap.is-open .qap-drawer {
    transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
    .qap-overlay,
    .qap-drawer {
        transition: none;
    }
}

.qap-view {
    padding: 0 24px 32px;
}

@media (max-width: 575px) {
    .qap-view {
        padding: 0 16px 28px;
    }

    .qap-head {
        margin: 0 -16px 20px;
        padding: 16px 16px 14px;
    }
}

/* ── κεφαλίδα ───────────────────────────────────────────────────────── */
.qap-head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 -24px 22px;
    padding: 22px 24px 18px;
    border-bottom: 1px solid #ececec;
    background: #fff;
}

.qap-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.01em;
    color: #1f2937;
}

.qap-close {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: -8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: #1f2937;
    cursor: pointer;
    transition: background-color .15s ease, transform .2s ease;
}

.qap-close:hover {
    background: #f3f4f6;
    transform: rotate(90deg);
}

.qap-close svg {
    width: 24px;
    height: 24px;
}

.qap-lead {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--qap-text);
}

/* ── πεδία (κουτιά με floating label) ───────────────────────────────── */
.qap-form {
    margin: 0;
}

.qap-field {
    position: relative;
    margin: 0 0 16px;
}

.qap-field input {
    display: block;
    width: 100%;
    height: 52px;
    padding: 20px 14px 4px;
    border: 1px solid #dcdfe6;
    border-radius: 10px;
    background: #fff;
    font-size: 15px;
    font-weight: 500;
    color: var(--qap-text);
    box-shadow: none;
    outline: 0;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.qap-field.has-eye input {
    padding-right: 52px;
}

.qap-field input:hover {
    border-color: #b9bfcb;
}

/* ίδιο στυλ με όλες τις φόρμες (custom.css ενότητα 54) */
.qap-field input:focus {
    border-color: #1c3673;
    box-shadow: 0 0 0 3px rgba(28, 54, 115, .12);
}

.qap-field label {
    position: absolute;
    top: 26px;
    left: 15px;
    margin: 0;
    font-size: 15px;
    font-weight: 400;
    line-height: 1;
    color: var(--qap-muted);
    pointer-events: none;
    transform: translateY(-50%);
    transition: top .15s ease, font-size .15s ease, color .15s ease;
}

.qap-field label span {
    margin-left: 2px;
}

.qap-field input:focus + label,
.qap-field input:not(:placeholder-shown) + label {
    top: 15px;
    font-size: 11.5px;
    font-weight: 500;
}

.qap-field input:focus + label {
    color: #1c3673;
}

@media (max-width: 767px) {
    .qap-field input {
        font-size: 16px;
    }
}

.qap-field.has-error input {
    border-color: var(--qap-danger);
    box-shadow: none;
}

.qap-error {
    margin: 6px 2px 0;
    font-size: 12px;
    color: var(--qap-danger);
}

.qap-error:empty {
    display: none;
}

.qap-eye {
    position: absolute;
    top: 6px;
    right: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--qap-text);
    cursor: pointer;
}

.qap-eye .qap-eye-on,
.qap-eye.is-on .qap-eye-off {
    display: none;
}

.qap-eye.is-on .qap-eye-on {
    display: block;
}

.qap-turnstile:not(:empty) {
    margin: 0 0 16px;
}

.qap-alert {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-left: 3px solid var(--qap-danger);
    border-radius: 4px;
    background: #fdf0f3;
    font-size: 13px;
    line-height: 1.45;
    color: #a30d2f;
}

/* ── κουμπιά ─────────────────────────────────────────────────────────── */
.qap-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    margin: 8px 0 0;
    padding: 0 20px;
    border: 1px solid var(--qap-primary);
    border-radius: 8px;
    background: var(--qap-primary);
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease, filter .15s ease;
}

.qap-btn:hover {
    color: #fff;
    text-decoration: none;
    filter: brightness(1.12);
}

/* ανενεργό μέχρι να συμπληρωθούν σωστά τα πεδία */
.qap-btn:disabled {
    border-color: #efefef;
    background: #efefef;
    color: #8c8c8c;
    filter: none;
    cursor: not-allowed;
}

.qap-btn.is-outline {
    border-color: var(--qap-text);
    background: #fff;
    color: var(--qap-text);
}

.qap-btn.is-outline:hover {
    background: #f5f5f5;
    color: var(--qap-text);
    filter: none;
}

.qap-btn.is-loading {
    color: transparent !important;
    pointer-events: none;
}

.qap-btn.is-loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: qapSpin .7s linear infinite;
}

@keyframes qapSpin {
    to { transform: rotate(360deg); }
}

/* ── σύνδεσμοι / διαχωριστικό ───────────────────────────────────────── */
.qap-note {
    margin: 18px 0 0;
    font-size: 15px;
    line-height: 1.5;
    text-align: center;
    color: var(--qap-text);
}

.qap-note a {
    color: var(--qap-link);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.qap-note a:hover {
    color: var(--qap-primary);
}

.qap-note-strong {
    margin: 0 0 4px;
    font-weight: 500;
}

.qap-divider {
    display: flex;
    align-items: center;
    gap: 22px;
    margin: 24px 0 0;
    font-size: 14px;
    color: var(--qap-text);
}

.qap-divider + .qap-note {
    margin-top: 16px;
}

.qap-divider + .qap-note-strong {
    margin-top: 28px;
    margin-bottom: 14px;
}

.qap-divider::before,
.qap-divider::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: var(--qap-text);
    opacity: .7;
}

/* ── συνδεδεμένος πελάτης ───────────────────────────────────────────── */
.qap-user {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 18px;
    padding: 16px;
    border-radius: 10px;
    background: #f5f6f8;
}

.qap-avatar {
    display: inline-flex;
    flex: 0 0 48px;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--qap-primary);
    font-size: 19px;
    font-weight: 700;
    color: #fff;
}

.qap-user-text {
    min-width: 0;
}

.qap-user-text strong {
    display: block;
    font-size: 16px;
    color: var(--qap-text);
}

.qap-user-text small {
    display: block;
    overflow: hidden;
    font-size: 13px;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--qap-muted);
}

.qap-links {
    display: flex;
    flex-direction: column;
    margin: 0 0 22px;
}

.qap-links a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 4px;
    border-bottom: 1px solid #ececec;
    font-size: 15px;
    font-weight: 500;
    color: var(--qap-text);
    text-decoration: none;
}

.qap-links a::after {
    content: "";
    width: 8px;
    height: 8px;
    margin: 0 4px 0 auto;
    border-top: 1.5px solid #9a9a9a;
    border-right: 1.5px solid #9a9a9a;
    transform: rotate(45deg);
    transition: transform .15s ease;
}

.qap-links a:hover {
    color: var(--qap-primary);
    text-decoration: none;
}

.qap-links a:hover::after {
    transform: translateX(3px) rotate(45deg);
}

.qap-links svg {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: var(--qap-primary);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}
