/**
 * WPS Right of Withdrawal — Frontend Styles
 * Неутрален дизайн, наследява шрифт и цветове от темата.
 */

.wps-wr-wrap {
    max-width: 720px;
    margin: 0 auto;
    font-family: inherit;
}

/* Налагаме шрифта на темата върху всички form елементи (select/option
   често не наследяват от родителя по подразбиране). !important, защото
   някои теми/браузъри налагат собствен шрифт на select). */
.wps-wr-wrap input,
.wps-wr-wrap select,
.wps-wr-wrap option,
.wps-wr-wrap textarea,
.wps-wr-wrap button,
.wps-wr-wrap select option {
    font-family: inherit !important;
    font-size: inherit;
}

/* ── Секции ──────────────────────────────────────────────────────────────── */

.wps-wr-section {
    margin-bottom: 28px;
}

.wps-wr-section h3,
.wps-wr-section h4 {
    margin-top: 0;
    margin-bottom: 12px;
}

.wps-wr-intro {
    color: #555;
    margin-bottom: 20px;
}

/* ── Полета ──────────────────────────────────────────────────────────────── */

.wps-wr-verify-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.wps-wr-field {
    margin-bottom: 18px;
}

.wps-wr-verify-fields .wps-wr-field {
    flex: 1 1 200px;
    margin-bottom: 0;
}

.wps-wr-verify-fields .wps-wr-field--btn {
    flex: 0 0 auto;
}

.wps-wr-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.wps-wr-optional {
    font-weight: 400;
    color: #888;
    font-size: 0.85em;
    margin-left: 4px;
}

.wps-wr-field input[type="number"],
.wps-wr-field input[type="email"],
.wps-wr-field input[type="text"],
.wps-wr-field select,
.wps-wr-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.wps-wr-field input:focus,
.wps-wr-field select:focus,
.wps-wr-field textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.15);
}

/* ── Чекбокс декларация ──────────────────────────────────────────────────── */

.wps-wr-field--checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 400;
    cursor: pointer;
    line-height: 1.5;
}

.wps-wr-field--checkbox input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ── Бутони ──────────────────────────────────────────────────────────────── */

.wps-wr-btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.2s, background 0.2s;
}

.wps-wr-btn--primary {
    background: #2271b1;
    color: #fff;
}

.wps-wr-btn--primary:hover {
    background: #135e96;
}

.wps-wr-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wps-wr-actions {
    margin-top: 24px;
}

/* ── Нотификации ─────────────────────────────────────────────────────────── */

.wps-wr-notice {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid transparent;
}

.wps-wr-notice__icon {
    font-size: 1.3rem;
    line-height: 1.4;
    flex-shrink: 0;
}

.wps-wr-notice p {
    margin: 6px 0 0;
}

.wps-wr-notice strong {
    display: block;
    margin-bottom: 2px;
}

.wps-wr-notice--success {
    background: #f0faf0;
    border-color: #46b450;
    color: #1a3a1a;
}

.wps-wr-notice--error {
    background: #fdf2f2;
    border-color: #dc3232;
    color: #3a1a1a;
}

.wps-wr-notice--warning {
    background: #fffbea;
    border-color: #f0b849;
    color: #3a2f00;
}

/* ── Съобщения ───────────────────────────────────────────────────────────── */

.wps-wr-message {
    padding: 10px 14px;
    border-radius: 4px;
    margin-top: 10px;
    font-size: 0.95rem;
}

.wps-wr-message--error {
    background: #fdf2f2;
    color: #cc1818;
    border: 1px solid #f5c6c6;
}

.wps-wr-message--success {
    background: #f0faf0;
    color: #1a7a1a;
    border: 1px solid #c3e6c3;
}

/* ── Информация за поръчката ─────────────────────────────────────────────── */

.wps-wr-order-summary {
    margin-bottom: 24px;
}

.wps-wr-order-table {
    border-collapse: collapse;
    font-size: 0.95rem;
    margin-top: 8px;
}

.wps-wr-order-table td {
    padding: 4px 12px 4px 0;
    vertical-align: top;
}

.wps-wr-order-table td:first-child {
    color: #666;
    white-space: nowrap;
}

/* ── Продукти за избор ───────────────────────────────────────────────────── */

.wps-wr-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wps-wr-item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.wps-wr-item-row:hover {
    border-color: #2271b1;
    background: #f7fbff;
}

.wps-wr-item-row input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.wps-wr-item-name {
    flex: 1;
    font-weight: 500;
}

.wps-wr-item-qty {
    color: #666;
    font-size: 0.9rem;
}

.wps-wr-item-price {
    font-weight: 600;
    color: #333;
}

/* ── Контакти ────────────────────────────────────────────────────────────── */

.wps-wr-contact-box {
    margin-top: 16px;
    padding: 16px;
    background: #f9f9f9;
    border-radius: 6px;
    font-size: 0.95rem;
}

.wps-wr-contact-box p {
    margin: 0 0 8px;
}

.wps-wr-contact-box ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.wps-wr-contact-box li {
    margin-bottom: 6px;
}

.wps-wr-contact-box a {
    color: #2271b1;
    text-decoration: none;
}

.wps-wr-contact-box a:hover {
    text-decoration: underline;
}

/* ── Успех ───────────────────────────────────────────────────────────────── */

.wps-wr-success-wrap {
    padding: 24px 0;
}

/* ── Текст под формата ───────────────────────────────────────────────────── */

.wps-wr-footer-text {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    font-size: 0.92rem;
    color: #555;
    line-height: 1.6;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
    .wps-wr-verify-fields .wps-wr-field {
        flex: 1 1 100%;
        margin-bottom: 14px;
    }

    .wps-wr-verify-fields .wps-wr-field--btn {
        margin-bottom: 0;
    }

    .wps-wr-verify-fields .wps-wr-btn {
        width: 100%;
    }

    .wps-wr-item-row {
        flex-wrap: wrap;
    }
}
