/**
 * WooCommerce Herroepingsknop — Frontend styles
 *
 * @package WH_Herroepingsknop
 */

/* ───── Wrapper ───── */
.wh-hk-wrapper {
    margin: 24px 0;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fafafa;
}

/* ───── Info text ───── */
.wh-hk-info p {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #555;
}

/* ───── Button ───── */
.wh-hk-button {
    display: inline-block;
    padding: 10px 22px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #fff !important;
    background-color: #d63638 !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    line-height: 1.4 !important;
}

.wh-hk-button:hover,
.wh-hk-button:focus {
    background-color: #b32d2e !important;
    box-shadow: 0 2px 8px rgba(214, 54, 56, 0.3);
    outline: none;
}

.wh-hk-button:focus-visible {
    outline: 2px solid #d63638;
    outline-offset: 2px;
}

/* ───── Modal overlay ───── */
.wh-hk-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wh-hk-modal[hidden] {
    display: none;
}

.wh-hk-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

/* ───── Modal content ───── */
.wh-hk-modal__content {
    position: relative;
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 8px;
    padding: 28px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: wh-hk-fade-in 0.2s ease;
}

@keyframes wh-hk-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wh-hk-modal__title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
    color: #1d2327;
}

.wh-hk-modal__order {
    margin: 0 0 20px;
    font-size: 14px;
    color: #666;
}

/* ───── Confirmation checkbox ───── */
.wh-hk-modal__confirm-field {
    margin: 0 0 16px;
    padding: 14px;
    background: #fef8ee;
    border: 1px solid #f0c674;
    border-radius: 4px;
}

.wh-hk-modal__confirm-field label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    cursor: pointer;
}

.wh-hk-modal__confirm-field input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}

/* ───── Reason field ───── */
.wh-hk-modal__reason-field {
    margin: 0 0 20px;
}

.wh-hk-modal__reason-field label {
    display: block;
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
}

.wh-hk-reason {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: vertical;
    box-sizing: border-box;
}

.wh-hk-reason:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

/* ───── Actions ───── */
.wh-hk-modal__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.wh-hk-submit {
    background-color: #d63638 !important;
    border-color: #d63638 !important;
    color: #fff !important;
}

.wh-hk-submit:hover:not(:disabled) {
    background-color: #b32d2e !important;
    border-color: #b32d2e !important;
}

.wh-hk-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ───── Response messages ───── */
.wh-hk-modal__message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
}

.wh-hk-modal__message[hidden] {
    display: none;
}

.wh-hk-modal__message--success {
    background: #edfaef;
    border: 1px solid #46b450;
    color: #1e6f28;
}

.wh-hk-modal__message--error {
    background: #fef0f0;
    border: 1px solid #d63638;
    color: #8b1a1c;
}

/* ───── Notice (already withdrawn) ───── */
.wh-hk-notice {
    margin: 24px 0;
    padding: 14px 20px;
    border-radius: 6px;
    font-size: 14px;
}

.wh-hk-notice--done {
    background: #f0f6fc;
    border: 1px solid #72aee6;
    color: #135e96;
}

/* ───── Spinner ───── */
.wh-hk-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wh-hk-spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes wh-hk-spin {
    to { transform: rotate(360deg); }
}
