/* ══════════════════════════════════════════════
   CCC SS Member – Form Styles
══════════════════════════════════════════════ */

.ccc-ss-wrap {
    max-width: 640px;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1a1a2e;
    position: relative;
}

/* ── Header ── */
.ccc-ss-header {
    text-align: center;
    margin-bottom: 28px;
}
.ccc-ss-header h2 {
    font-size: 1.9rem;
    font-weight: 800;
    margin: 0 0 6px;
    color: #111827;
}
.ccc-ss-subtitle {
    color: #6b7280;
    font-size: 0.97rem;
    margin: 0;
}

/* ── Plan banner (single plan) ── */
.ccc-ss-plan-banner {
    background: linear-gradient(135deg, #0070ba 0%, #003087 100%);
    color: #fff;
    border-radius: 14px;
    padding: 22px 28px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.ccc-ss-plan-banner-name {
    font-size: 1.1rem;
    font-weight: 700;
}
.ccc-ss-plan-banner-desc {
    font-size: 0.82rem;
    opacity: 0.85;
    margin-top: 3px;
}
.ccc-ss-plan-banner-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    white-space: nowrap;
}
.ccc-ss-plan-banner-currency {
    font-size: 0.95rem;
    font-weight: 600;
    opacity: 0.85;
}
.ccc-ss-plan-banner-amount {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
}
.ccc-ss-plan-banner-duration {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* ── Plan selector (multiple plans) ── */
.ccc-ss-plan-selector {
    margin-bottom: 28px;
}
.ccc-ss-plan-selector-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
}
.ccc-ss-plans-inline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}
.ccc-ss-plan-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0; height: 0;
}
.ccc-ss-plan-option {
    cursor: pointer;
}
.ccc-ss-plan-option-inner {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    background: #fff;
}
.ccc-ss-plan-option input:checked + .ccc-ss-plan-option-inner {
    border-color: #0070ba;
    background: #f0f8ff;
    box-shadow: 0 0 0 3px rgba(0,112,186,.12);
}
.ccc-ss-plan-option-inner:hover {
    border-color: #93c5fd;
}
.ccc-ss-plan-option-name     { font-weight: 700; font-size: 0.9rem; margin-bottom: 4px; }
.ccc-ss-plan-option-price    { font-size: 1.1rem; color: #0070ba; font-weight: 700; }
.ccc-ss-plan-option-duration { font-size: 0.75rem; color: #9ca3af; margin-top: 2px; }

/* ── Notices ── */
.ccc-ss-notices { margin-bottom: 16px; }
.ccc-ss-notice {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.88rem;
    margin-bottom: 8px;
}
.ccc-ss-notice.error   { background: #fef2f2; color: #b91c1c; border-left: 4px solid #ef4444; }
.ccc-ss-notice.success { background: #f0fdf4; color: #15803d; border-left: 4px solid #22c55e; }

/* ── Fields grid ── */
.ccc-ss-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}
.ccc-ss-field-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.ccc-ss-field-group.full { grid-column: 1 / -1; }

.ccc-ss-field-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #374151;
    letter-spacing: .01em;
}
.req { color: #ef4444; }

.ccc-ss-field-group input {
    padding: 10px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.94rem;
    outline: none;
    background: #fafafa;
    transition: border-color 0.18s, box-shadow 0.18s;
    width: 100%;
    box-sizing: border-box;
}
.ccc-ss-field-group input:focus {
    border-color: #0070ba;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0,112,186,.12);
}
.ccc-ss-field-group input.field-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,.1);
}

/* ── Password with eye toggle ── */
.ccc-ss-input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}
.ccc-ss-input-with-icon input {
    padding-right: 44px;
}
.ccc-ss-eye-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #9ca3af;
    display: flex;
    align-items: center;
    transition: color 0.15s;
    line-height: 0;
}
.ccc-ss-eye-btn:hover { color: #0070ba; }

/* ── Payment section ── */
.ccc-ss-payment-section {
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    padding: 22px 24px;
    background: #fafcff;
}
.ccc-ss-payment-header {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ccc-ss-paypal-label {
    font-size: 0.83rem;
    color: #6b7280;
    margin: 0 0 14px;
}
#paypal-button-container { margin-bottom: 8px; }
#paypal-card-container   { margin-bottom: 8px; }

.ccc-ss-secure-badge {
    text-align: center;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 12px;
    margin-bottom: 0;
}
.ccc-pp-error {
    color: #b91c1c;
    font-size: 0.88rem;
    padding: 10px;
    background: #fef2f2;
    border-radius: 6px;
}

/* ── Spinner overlay ── */
.ccc-ss-spinner {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    z-index: 100;
}
.ccc-ss-spinner-ring {
    width: 44px; height: 44px;
    border: 4px solid #e5e7eb;
    border-top-color: #0070ba;
    border-radius: 50%;
    animation: ccc-spin 0.7s linear infinite;
}
@keyframes ccc-spin { to { transform: rotate(360deg); } }

/* ── Success ── */
.ccc-ss-success {
    text-align: center;
    padding: 56px 24px;
    animation: ccc-fadein 0.4s ease;
}
.ccc-ss-success-icon {
    font-size: 2.5rem;
    color: #22c55e;
    width: 76px; height: 76px;
    border-radius: 50%;
    background: #f0fdf4;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
}
.ccc-ss-success h2 { font-size: 1.75rem; font-weight: 800; margin-bottom: 8px; }
.ccc-ss-success p  { color: #6b7280; font-size: 0.97rem; }

@keyframes ccc-fadein {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

/* ── Responsive ── */
@media (max-width: 560px) {
    .ccc-ss-fields { grid-template-columns: 1fr; }
    .ccc-ss-field-group.full { grid-column: 1; }
    .ccc-ss-plan-banner { flex-direction: column; align-items: flex-start; }
    .ccc-ss-header h2 { font-size: 1.5rem; }
}

/* ── PayPal / Card payment section ── */
.ccc-ss-pay-method-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 10px;
}

/* OR divider */
.ccc-ss-or-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    color: #9ca3af;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.ccc-ss-or-divider::before,
.ccc-ss-or-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

/* Card fields sub-grid */
.ccc-ss-card-fields {
    margin-bottom: 16px;
}

/* Hosted field iframe containers */
.ccc-ss-hosted-field {
    height: 42px;
    padding: 0;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    background: #fafafa;
    box-sizing: border-box;
    transition: border-color 0.18s, box-shadow 0.18s;
    overflow: hidden;
    /* PayPal injects an iframe inside — give it room */
    display: flex;
    align-items: center;
}
.ccc-ss-hosted-field.braintree-hosted-fields-focused,
.ccc-ss-hosted-field:focus-within {
    border-color: #0070ba;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0,112,186,.12);
}
.ccc-ss-hosted-field.braintree-hosted-fields-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,.1);
}
/* Make the iframe fill the container */
.ccc-ss-hosted-field iframe {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
}

/* Card Pay button */
.ccc-ss-card-pay-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 20px;
    background: #111827;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s, transform 0.1s;
    margin-top: 4px;
}
.ccc-ss-card-pay-btn:hover  { background: #1f2937; }
.ccc-ss-card-pay-btn:active { transform: scale(0.98); }

/* Card error message */
.ccc-card-error-msg {
    color: #b91c1c;
    font-size: 0.85rem;
    background: #fef2f2;
    border-left: 3px solid #ef4444;
    padding: 10px 14px;
    border-radius: 6px;
    margin-top: 10px;
}

/* ══ Section title ══ */
.ccc-ss-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #9ca3af;
    margin-bottom: 14px;
    margin-top: 4px;
}

/* ══ Payment tabs ══ */
.ccc-ss-pay-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}
.ccc-ss-pay-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: border-color 0.18s, color 0.18s, background 0.18s;
}
.ccc-ss-pay-tab:hover {
    border-color: #93c5fd;
    color: #374151;
}
.ccc-ss-pay-tab.active {
    border-color: #0070ba;
    color: #0070ba;
    background: #f0f8ff;
}

/* ══ Pay panels ══ */
.ccc-ss-pay-panel { display: none; }
.ccc-ss-pay-panel.active { display: block; animation: ccc-fadein 0.2s ease; }

/* ══ Card form ══ */
.ccc-ss-card-fields { margin-bottom: 14px; }

.ccc-ss-card-number-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.ccc-ss-card-number-wrap input {
    padding-right: 72px;
}
.ccc-card-type-icon {
    position: absolute;
    right: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #6b7280;
    pointer-events: none;
    white-space: nowrap;
}

/* Card Pay button */
.ccc-ss-card-pay-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 20px;
    background: #111827;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s, transform 0.1s;
    margin-top: 6px;
}
.ccc-ss-card-pay-btn:hover  { background: #1f2937; }
.ccc-ss-card-pay-btn:active { transform: scale(0.98); }

/* Card error */
.ccc-card-error-msg {
    color: #b91c1c;
    font-size: 0.85rem;
    background: #fef2f2;
    border-left: 3px solid #ef4444;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 10px;
}

/* Remove old hosted-field styles if any leftover */
.ccc-ss-hosted-field { display: none; }

/* ══════════════════════════════════════════════
   CCC Member Login Form
══════════════════════════════════════════════ */

.ccc-login-wrap {
    max-width: 420px;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1a1a2e;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 36px 40px;
    box-shadow: 0 4px 24px rgba(0,0,0,.07);
}

/* ── Header ── */
.ccc-login-header {
    text-align: center;
    margin-bottom: 28px;
}
.ccc-login-title {
    font-size: 1.55rem;
    font-weight: 800;
    margin: 0 0 6px;
    color: #111827;
}
.ccc-login-subtitle {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0;
}

/* ── Notices ── */
.ccc-login-notices { margin-bottom: 16px; }
.ccc-login-notice {
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
}
.ccc-login-notice.error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.ccc-login-notice.success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

/* ── Fields ── */
.ccc-login-field {
    margin-bottom: 18px;
}
.ccc-login-field label {
    display: block;
    font-size: 0.845rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
.ccc-login-field input[type="text"],
.ccc-login-field input[type="password"],
.ccc-login-field input[type="email"] {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #111827;
    background: #f9fafb;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}
.ccc-login-field input:focus {
    border-color: #0070ba;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0,112,186,.12);
}

/* ── Password wrapper ── */
.ccc-login-pw-wrap {
    position: relative;
}
.ccc-login-pw-wrap input {
    padding-right: 42px;
}
.ccc-login-eye {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    padding: 0;
    line-height: 1;
    display: flex;
    align-items: center;
}
.ccc-login-eye:hover { color: #0070ba; }

/* ── Remember / forgot row ── */
.ccc-login-row-remember {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    font-size: 0.845rem;
}
.ccc-login-remember {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #374151;
    cursor: pointer;
    font-weight: 500;
}
.ccc-login-remember input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #0070ba;
    cursor: pointer;
}
.ccc-login-forgot {
    color: #0070ba;
    text-decoration: none;
    font-weight: 600;
}
.ccc-login-forgot:hover { text-decoration: underline; }

/* ── Submit button ── */
.ccc-login-submit {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #0070ba, #003087);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity .15s, transform .1s;
    letter-spacing: .01em;
}
.ccc-login-submit:hover:not(:disabled)  { opacity: .92; transform: translateY(-1px); }
.ccc-login-submit:disabled { opacity: .65; cursor: not-allowed; }

/* ── Spinner animation ── */
.ccc-spin {
    animation: ccc-login-spin .7s linear infinite;
}
@keyframes ccc-login-spin { to { transform: rotate(360deg); } }

/* ── Logged-in state ── */
.ccc-login-already {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.ccc-login-avatar img {
    border-radius: 50%;
    width: 48px;
    height: 48px;
}
.ccc-login-already-text { flex: 1; }
.ccc-login-hi {
    margin: 0 0 2px;
    font-size: .95rem;
    color: #111827;
}
.ccc-login-already-sub {
    margin: 0;
    font-size: .8rem;
    color: #6b7280;
}
.ccc-login-logout-btn {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: .845rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s;
}
.ccc-login-logout-btn:hover { background: #e5e7eb; }

@media (max-width: 480px) {
    .ccc-login-wrap { padding: 28px 20px; }
}

/* ── Forgot password panel extras ── */
.ccc-login-back-wrap {
    text-align: center;
    margin-top: 16px;
    margin-bottom: 0;
}
.ccc-login-back {
    color: #6b7280;
    font-size: 0.845rem;
    font-weight: 600;
    text-decoration: none;
}
.ccc-login-back:hover { color: #0070ba; }

/* ── Info notice (3DS) ── */
.ccc-ss-notice.info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
}

/* ── Spinner message ── */
.ccc-ss-spinner-msg {
    margin-top: 12px;
    font-size: 0.875rem;
    color: #374151;
    font-weight: 500;
    text-align: center;
}