/* ── WC Withdrawal Pro — withdrawal.css ─────────────────────────────────── */

/* ── Overlay ────────────────────────────────────────────────────────────── */

.wcwp-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: wcwp-fade-in .18s ease;
}

@keyframes wcwp-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Modal ──────────────────────────────────────────────────────────────── */

.wcwp-modal {
    background: #fff;
    border-radius: 10px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    animation: wcwp-slide-up .2s ease;
    overflow: hidden;
}

@keyframes wcwp-slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.wcwp-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: #1a1a2e;
    color: #fff;
}

.wcwp-modal__title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.wcwp-modal__close {
    background: none;
    border: none;
    color: rgba(255,255,255,.65);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color .15s;
    display: flex;
    align-items: center;
}
.wcwp-modal__close:hover { color: #fff; }

.wcwp-modal__body {
    padding: 24px;
}

.wcwp-modal__order-num {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 16px;
}

.wcwp-modal__note {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    border-radius: 0 6px 6px 0;
    padding: 12px 16px;
    font-size: 13px;
    color: #78350f;
    line-height: 1.6;
    margin-bottom: 20px;
}
.wcwp-modal__note p { margin: 0; }

.wcwp-modal__field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
}

.wcwp-modal__field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
    font-family: inherit;
}
.wcwp-modal__field textarea:focus {
    outline: none;
    border-color: #1a1a2e;
    box-shadow: 0 0 0 3px rgba(26,26,46,.1);
}

.wcwp-modal__error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 10px 14px;
    color: #b91c1c;
    font-size: 13px;
    margin-top: 12px;
}

.wcwp-modal__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

/* ── Κουμπιά ────────────────────────────────────────────────────────────── */

.wcwp-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    line-height: 1.3;
    transition: background .15s, transform .12s, box-shadow .15s;
    text-decoration: none;
}
.wcwp-btn:focus-visible {
    outline: 3px solid #e94560;
    outline-offset: 2px;
}

.wcwp-btn--secondary {
    background: transparent;
    color: #64748b;
    border-color: #e2e8f0;
}
.wcwp-btn--secondary:hover { background: #f1f5f9; color: #1e293b; }

.wcwp-btn--confirm {
    background: #e94560;
    color: #fff;
    border-color: #e94560;
}
.wcwp-btn--confirm:hover {
    background: #c73652;
    box-shadow: 0 3px 10px rgba(233,69,96,.35);
    transform: translateY(-1px);
}
.wcwp-btn--confirm:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}

/* ── Κουμπί στη λίστα παραγγελιών (override WC styles) ─────────────────── */

.woocommerce a.wcwp-open-modal.button,
.woocommerce .wcwp-open-modal.button {
    background: #1a1a2e !important;
    color: #fff !important;
    border-color: #1a1a2e !important;
    font-weight: 600;
    padding: 8px 14px;
    font-size: 13px;
    transition: background .15s !important;
}
.woocommerce a.wcwp-open-modal.button:hover {
    background: #16213e !important;
    color: #fff !important;
}

/* ── Success overlay ────────────────────────────────────────────────────── */

.wcwp-overlay--success { z-index: 100000; }

.wcwp-success-box {
    background: #fff;
    border-radius: 10px;
    padding: 40px 36px;
    text-align: center;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    animation: wcwp-slide-up .2s ease;
}

.wcwp-success-icon {
    width: 60px;
    height: 60px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin: 0 auto 20px;
}

.wcwp-success-box h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 10px;
}

.wcwp-success-box p { color: #475569; font-size: 14px; margin: 0 0 8px; }
.wcwp-success-meta { font-size: 13px !important; color: #94a3b8 !important; }

/* ── Labels ─────────────────────────────────────────────────────────────── */

.wcwp-required { color: #e94560; }
.wcwp-optional { font-size: 12px; font-weight: 400; color: #94a3b8; }

/* ── Guest page ─────────────────────────────────────────────────────────── */

.wcwp-guest-page {
    max-width: 700px;
    margin: 40px auto;
    padding: 0 20px;
}

.wcwp-guest-order-details {
    background: #f8fafc;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 28px;
}

.wcwp-order-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}
.wcwp-order-table th,
.wcwp-order-table td {
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    text-align: left;
    font-size: 14px;
}
.wcwp-order-table th { background: #f1f5f9; font-weight: 600; }

.wcwp-guest-form-wrap {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 28px;
}

.wcwp-guest-field label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    color: #1e293b;
}
.wcwp-guest-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
    box-sizing: border-box;
    font-family: inherit;
    resize: vertical;
}
.wcwp-guest-field textarea:focus {
    outline: none;
    border-color: #1a1a2e;
    box-shadow: 0 0 0 3px rgba(26,26,46,.1);
}

.wcwp-guest-success {
    text-align: center;
    padding: 60px 20px;
}
.wcwp-guest-success .wcwp-success-icon {
    width: 64px; height: 64px;
    background: #22c55e; color: #fff;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 32px; margin-bottom: 20px;
}

.wcwp-guest-expired, .wcwp-guest-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 14px 18px;
    color: #b91c1c;
    margin-bottom: 20px;
}

.wcwp-legal-note { font-size: 12px; color: #94a3b8; margin-top: 12px; }

@media (max-width: 480px) {
    .wcwp-modal__footer { flex-direction: column-reverse; }
    .wcwp-btn--confirm  { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    .wcwp-modal, .wcwp-success-box, .wcwp-overlay { animation: none; }
}

/* ── v1.0.2 additions ───────────────────────────────────────────────────── */

.wcwp-modal__header-text { flex: 1; }

.wcwp-modal__subtitle {
    margin: 4px 0 0;
    font-size: 13px;
    color: rgba(255,255,255,.7);
}

.wcwp-modal__intro {
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

/* 2-column row */
.wcwp-modal__row {
    display: flex;
    gap: 14px;
}
.wcwp-modal__row .wcwp-modal__field { flex: 1; }

/* Fields */
.wcwp-modal__field {
    margin-bottom: 16px;
}
.wcwp-modal__field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 5px;
}
.wcwp-modal__field input[type="text"],
.wcwp-modal__field input[type="email"],
.wcwp-modal__field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    color: #1e293b;
    background: #fff;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.wcwp-modal__field input:focus,
.wcwp-modal__field textarea:focus {
    outline: none;
    border-color: #1a1a2e;
    box-shadow: 0 0 0 3px rgba(26,26,46,.1);
}
.wcwp-modal__field input.wcwp-invalid,
.wcwp-modal__field textarea.wcwp-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,.1);
}
.wcwp-input--readonly {
    background: #f8fafc !important;
    color: #64748b !important;
    cursor: default;
}

.wcwp-field-hint {
    display: block;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
    line-height: 1.4;
}

/* GDPR */
.wcwp-modal__gdpr {
    font-size: 12px;
    color: #94a3b8;
    margin: 4px 0 0;
    line-height: 1.5;
}
.wcwp-modal__gdpr a {
    color: #64748b;
    text-decoration: underline;
}

/* Mobile */
@media (max-width: 600px) {
    .wcwp-modal {
        margin: 0;
        border-radius: 16px 16px 0 0;
        max-height: 92vh;
        overflow-y: auto;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
    }
    .wcwp-overlay {
        align-items: flex-end;
        padding: 0;
    }
    .wcwp-modal__row {
        flex-direction: column;
        gap: 0;
    }
    .wcwp-modal__footer {
        flex-direction: column-reverse;
        gap: 8px;
    }
    .wcwp-btn--confirm {
        width: 100%;
        justify-content: center;
    }
    .wcwp-btn--secondary {
        width: 100%;
        justify-content: center;
    }
}

/* ── Standalone form (shortcode) ────────────────────────────────────────── */
.wcwp-standalone-form {
    max-width: 640px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 28px;
    box-shadow: 0 2px 16px rgba(0,0,0,.07);
    margin: 20px 0;
}
.wcwp-sf-row {
    display: flex;
    gap: 14px;
    margin-bottom: 16px;
}
.wcwp-sf-row .wcwp-sf-field { flex: 1; }
.wcwp-sf-field {
    margin-bottom: 16px;
}
.wcwp-sf-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 5px;
}
.wcwp-sf-input {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    color: #1e293b;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.wcwp-sf-input:focus {
    outline: none;
    border-color: #1a1a2e;
    box-shadow: 0 0 0 3px rgba(26,26,46,.1);
}
.wcwp-sf-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    padding: 14px 18px;
    color: #166534;
    font-size: 14px;
    margin-bottom: 12px;
}
@media (max-width: 600px) {
    .wcwp-sf-row { flex-direction: column; gap: 0; }
    .wcwp-standalone-form { padding: 20px 16px; }
}

/* ── Terms checkbox ─────────────────────────────────────────────────────── */
.wcwp-terms-field {
    margin-bottom: 12px;
}
.wcwp-terms-label {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: 400 !important;
    font-size: 14px;
    color: #1e293b;
    line-height: 1.5;
}
.wcwp-terms-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #1a1a2e;
}
.wcwp-terms-label a {
    color: #1a1a2e;
    text-decoration: underline;
    font-weight: 600;
}
.wcwp-terms-label a:hover { color: #e94560; }

.wcwp-terms-error .wcwp-terms-label {
    color: #ef4444;
}
.wcwp-terms-error .wcwp-terms-label input[type="checkbox"] {
    outline: 2px solid #ef4444;
    border-radius: 3px;
}

/* ── View order action button ───────────────────────────────────────────── */
.wcwp-view-order-action {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.wcwp-days-left {
    font-size: 13px;
    color: #64748b;
}
