/**
 * Postcode Check — Form styling.
 * Matches ct-deal design system.
 */

/* Wrapper */
.pc-wrapper {
    max-width: 480px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 15px;
    color: #0f172a;
    line-height: 1.5;
    background: linear-gradient(145deg, #e8eeea 0%, #eff3f0 40%, #f5f7f5 100%);
    border: 1px solid #e0e6e2;
    border-radius: 20px;
    padding: 28px 28px 24px;
    position: relative;
    overflow: hidden;
    animation: pcFadeUp .4s ease both;
}

.pc-wrapper::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 160px;
    height: 160px;
    background: rgba(26, 86, 219, 0.04);
    border-radius: 50%;
    pointer-events: none;
}

.pc-wrapper--standalone {
    max-width: 520px;
    margin: 40px auto;
}

/* Header */
.pc-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.pc-header-icon {
    width: 36px;
    height: 36px;
    background: #1a56db;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pc-title {
    font-family: 'Sora', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: #0f172a;
    line-height: 1.3;
}

.pc-description {
    margin: 0 0 20px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
}

/* Fields */
.pc-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.pc-field--postcode {
    grid-column: 1 / -1;
}

.pc-field label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 5px;
}

.pc-optional {
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: #94a3b8;
}

.pc-input {
    display: block;
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #d0d9d4;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    color: #0f172a;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

.pc-input:focus {
    outline: none;
    border-color: #1a56db;
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.pc-input::placeholder {
    color: #b8c4bc;
    font-weight: 400;
}

/* Error message */
.pc-error {
    background: #fef2f2;
    border: 1.5px solid #fecaca;
    color: #991b1b;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.5;
}

/* Button */
.pc-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease;
    width: 100%;
    text-decoration: none;
    white-space: nowrap;
}

.pc-button:active {
    transform: scale(0.98);
}

.pc-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.pc-button--submit {
    background: #f97316;
    color: #fff;
}

.pc-button--submit:hover:not(:disabled) {
    background: #ea6a07;
}

/* Spinner */
.pc-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: pcSpin 0.6s linear infinite;
}

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

@keyframes pcFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 640px) {
    .pc-wrapper {
        max-width: 100% !important;
        padding: 20px 20px 18px;
        border-radius: 16px;
    }

    .pc-wrapper--standalone {
        margin: 20px 16px;
    }

    .pc-fields {
        grid-template-columns: 1fr;
    }
}
