/* Recipe Hub Connector — Checkout & My Account Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

:root {
    --rhc-accent:     #2ECC9A;
    --rhc-accent-dk:  #24a87f;
    --rhc-danger:     #e74c3c;
    --rhc-text:       #1a2332;
    --rhc-muted:      #6b7a8d;
    --rhc-border:     #e5eaf0;
    --rhc-bg:         #f7f9fc;
    --rhc-white:      #ffffff;
    --rhc-radius:     10px;
    --rhc-radius-sm:  6px;
}

/* ── Checkout opt-in field ───────────────────────────────────────────── */
.rhc-optin-field {
    margin: 18px 0;
    padding: 18px 20px;
    background: var(--rhc-white);
    border: 1.5px solid var(--rhc-border);
    border-radius: var(--rhc-radius);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    transition: border-color .2s, box-shadow .2s;
}
.rhc-optin-field:hover {
    border-color: var(--rhc-accent);
    box-shadow: 0 2px 12px rgba(46,204,154,.12);
}

.rhc-optin-label {
    display: flex !important;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    margin: 0 !important;
}

/* Hide native checkbox */
.rhc-optin-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Custom checkbox */
.rhc-optin-checkmark {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: 2px solid var(--rhc-border);
    border-radius: 6px;
    background: var(--rhc-white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color .15s, background .15s;
    margin-top: 1px;
}
.rhc-optin-label input:checked ~ .rhc-optin-checkmark {
    background: var(--rhc-accent);
    border-color: var(--rhc-accent);
}
.rhc-optin-checkmark::after {
    content: '';
    display: none;
    width: 6px;
    height: 11px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
}
.rhc-optin-label input:checked ~ .rhc-optin-checkmark::after { display: block; }

.rhc-optin-text {
    font-size: 15px;
    color: var(--rhc-text);
    line-height: 1.5;
}
.rhc-optin-sub {
    font-size: 13px;
    color: var(--rhc-muted);
    margin: 8px 0 0 34px;
    line-height: 1.4;
}

/* Already linked info box */
.rhc-already-linked {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #d1faf0;
    border-radius: var(--rhc-radius-sm);
    border: 1px solid #a3f0d8;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    color: #0f7a56;
    font-weight: 500;
    margin: 16px 0;
}
.rhc-already-linked-icon { font-size: 16px; }

/* ── My Account tab ──────────────────────────────────────────────────── */
.rhc-account-tab {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--rhc-text);
}
.rhc-access-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 28px;
    background: var(--rhc-white);
    border-radius: var(--rhc-radius);
    border: 1px solid var(--rhc-border);
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    max-width: 600px;
}
.rhc-access-body h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--rhc-text);
}
.rhc-access-body p {
    font-size: 14px;
    color: var(--rhc-muted);
    margin: 0 0 16px;
    line-height: 1.6;
}
.rhc-access-since {
    font-size: 13px;
    color: var(--rhc-muted);
    margin: 4px 0 16px !important;
}
.rhc-access-icon { flex-shrink: 0; }

/* Buttons (frontend, no wp-admin dependency) */
.rhc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--rhc-radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background .15s;
    line-height: 1.4;
}
.rhc-btn-primary { background: var(--rhc-accent); color: #fff; }
.rhc-btn-primary:hover { background: var(--rhc-accent-dk); color: #fff; }
.rhc-btn:disabled { opacity: .6; cursor: not-allowed; }

/* Activate result notice */
.rhc-activate-notice {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: var(--rhc-radius-sm);
    font-size: 14px;
    font-weight: 500;
}
.rhc-activate-notice.success { background: #d1faf0; color: #0f7a56; }
.rhc-activate-notice.error   { background: #fde8e8; color: #a61010; }

/* Spinner */
.rhc-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: rhc-spin .6s linear infinite;
    vertical-align: middle;
}
@keyframes rhc-spin { to { transform: rotate(360deg); } }
