/* =========================================================
   WooCommerce Pincode Checker – Frontend Styles
   ========================================================= */

.wpc-pincode-checker {
    margin: 16px 0;
    font-family: inherit;
    box-sizing: border-box;
    max-width: 480px;
    width: 100%;
}

/* Title */
.wpc-checker-header {
    margin-bottom: 12px;
}

.wpc-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.2;
}

/* Hide emoji icon in new design */
.wpc-icon {
    display: none;
}

/* Input wrapper – positions button inside input */
.wpc-input-row {
    position: relative;
    display: flex;
    align-items: center;
}

.wpc-input {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid #d0d0d0;
    border-radius: 10px;
    font-size: 15px;
    color: #1a1a2e;
    background: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    /* room for the inline button */
    padding-right: 160px;
}

.wpc-input::placeholder {
    color: #e0547a;
    font-weight: 600;
    font-size: 15px;
}

.wpc-input:focus {
    border-color: #b0b0b0;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.wpc-input.wpc-input-error {
    border-color: #e0547a;
}

/* Inline check button – hidden until 6 digits typed */
.wpc-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    padding: 0;
    background: transparent;
    border: none;
    color: #e0547a;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    letter-spacing: 0.2px;
    transition: color 0.15s;
    display: none; /* hidden by default */
    line-height: 1;
}

.wpc-btn.wpc-btn-visible {
    display: block;
}

.wpc-btn:hover {
    color: #c0395e;
}

.wpc-btn:disabled {
    color: #aaa;
    cursor: not-allowed;
}

/* Result area */
.wpc-result {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    animation: wpc-fade-in 0.2s ease;
}

@keyframes wpc-fade-in {
    from { opacity: 0; transform: translateY(-3px); }
    to   { opacity: 1; transform: translateY(0); }
}

.wpc-result.wpc-available {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    color: #1b5e20;
}

.wpc-result.wpc-unavailable {
    background: #fce4ec;
    border: 1px solid #f48fb1;
    color: #880e4f;
}

.wpc-result.wpc-error,
.wpc-result.wpc-invalid {
    background: #fff3e0;
    border: 1px solid #ffcc80;
    color: #e65100;
}

.wpc-result.wpc-checking {
    color: #555;
    background: none;
    border: none;
    padding-left: 0;
    font-size: 13px;
}

/* Mobile */
@media (max-width: 480px) {
    .wpc-pincode-checker {
        max-width: 100%;
    }

    .wpc-title {
        font-size: 18px;
    }

    .wpc-input {
        font-size: 15px;
        padding: 13px 16px;
        padding-right: 150px;
    }

    .wpc-btn {
        font-size: 13px;
        right: 12px;
    }
}

/* Invalid pincode – same style as error but distinct class */
.wpc-result.wpc-invalid {
    background: #fce4ec;
    border: 1px solid #f48fb1;
    color: #880e4f;
}
