/* ============================================================
   Educator AI Shop Widget
============================================================ */

/* ---- Logged-in State ---- */
.eai-shop-loggedin {
    max-width: 520px;
    margin: 40px auto;
    text-align: center;
}
.eai-shop-loggedin-inner {
    background: #fff;
    border: 1px solid #e8eaf0;
    border-radius: 20px;
    padding: 48px 36px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.07);
}
.eai-shop-loggedin-icon { font-size: 2.5em; margin-bottom: 12px; }
.eai-shop-loggedin-inner h2 { font-size: 1.6em; color: #1e1b4b; margin: 0 0 10px; }
.eai-shop-loggedin-inner p  { color: #6b7280; margin: 0 0 24px; }

/* ---- Wrapper ---- */
.eai-shop-wrapper {
    max-width: 1060px;
    margin: 0 auto;
    font-family: inherit;
    box-sizing: border-box;
}
.eai-shop-wrapper *, .eai-shop-wrapper *::before, .eai-shop-wrapper *::after {
    box-sizing: border-box;
}

/* ---- Intro ---- */
.eai-shop-intro {
    text-align: center;
    margin-bottom: 36px;
}
.eai-shop-heading {
    font-size: clamp(1.6em, 3vw, 2.2em);
    font-weight: 800;
    color: #1e1b4b;
    margin: 0 0 10px;
}
.eai-shop-sub {
    font-size: 1.05em;
    color: #6b7280;
    margin: 0 0 18px;
}

.eai-shop-btn--dashboard {
    display: inline-flex;
    width: auto;
    margin: 0 auto 8px;
    padding: 11px 28px;
    font-size: 0.9em;
}

/* ---- Plan Cards Grid ---- */
.eai-shop-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: stretch;
}

@media (max-width: 820px) {
    .eai-shop-cards { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
}

/* ---- Individual Card ---- */
.eai-plan-card {
    position: relative;
    background: #fff;
    border: 2px solid #e8eaf0;
    border-radius: 20px;
    padding: 32px 28px 28px;
    display: flex;
    flex-direction: column;
    gap: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}

.eai-plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.10);
}

.eai-plan-card--yearly {
    border-color: #8B5CF6;
    background: linear-gradient(160deg, #faf8ff 0%, #fff 100%);
    box-shadow: 0 8px 32px rgba(139,92,246,0.12);
}
.eai-plan-card--yearly:hover {
    box-shadow: 0 20px 56px rgba(139,92,246,0.20);
}

/* ---- Badge ---- */
.eai-plan-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: #e8eaf0;
    color: #6b7280;
    font-size: 0.72em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 4px 14px;
    border-radius: 99px;
    white-space: nowrap;
}
.eai-plan-badge--best {
    background: linear-gradient(135deg, #7C3AED, #8B5CF6);
    color: #fff;
}

/* ---- Card Content ---- */
.eai-plan-icon {
    font-size: 2.2em;
    margin-bottom: 12px;
    margin-top: 8px;
}
.eai-plan-name {
    font-size: 1.15em;
    font-weight: 800;
    color: #1e1b4b;
    margin: 0 0 14px;
}
.eai-plan-price {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-bottom: 20px;
}
.eai-plan-amount {
    font-size: 1.7em;
    font-weight: 800;
    color: #1e1b4b;
    line-height: 1;
}
/* WooCommerce injects spans — tame them */
.eai-plan-amount .woocommerce-Price-amount,
.eai-plan-amount bdi {
    font-size: inherit !important;
    font-weight: inherit !important;
    color: inherit !important;
}
.eai-plan-period {
    font-size: 0.88em;
    color: #9ca3af;
    font-weight: 500;
}

.eai-plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}
.eai-plan-features li {
    font-size: 0.91em;
    color: #374151;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

/* ---- Buttons ---- */
.eai-shop-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.93em;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.18s ease;
    width: 100%;
    text-align: center;
}

.eai-shop-btn--free {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}
.eai-shop-btn--free:hover {
    background: #e5e7eb;
    color: #111827;
}

.eai-shop-btn--monthly {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff !important;
}
.eai-shop-btn--monthly:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    box-shadow: 0 8px 24px rgba(37,99,235,0.3);
    transform: translateY(-1px);
}

.eai-shop-btn--yearly {
    background: linear-gradient(135deg, #7C3AED, #6D28D9);
    color: #fff !important;
}
.eai-shop-btn--yearly:hover {
    background: linear-gradient(135deg, #6D28D9, #5b21b6);
    box-shadow: 0 8px 24px rgba(109,40,217,0.35);
    transform: translateY(-1px);
}

.eai-shop-btn--primary {
    background: linear-gradient(135deg, #7C3AED, #6D28D9);
    color: #fff !important;
    font-size: 1em;
    padding: 14px 28px;
    border-radius: 12px;
}
.eai-shop-btn--primary:hover {
    background: linear-gradient(135deg, #6D28D9, #5b21b6);
    box-shadow: 0 10px 28px rgba(109,40,217,0.32);
    transform: translateY(-1px);
    color: #fff !important;
    text-decoration: none;
}

.eai-shop-btn--submit {
    width: 100%;
    margin-top: 8px;
    padding: 14px;
    font-size: 1em;
    border-radius: 12px;
}
.eai-shop-btn--submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none !important;
}

/* ---- Registration Panel ---- */
.eai-shop-register {
    animation: eaiShopFadeIn 0.3s ease;
}

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

.eai-shop-register-inner {
    background: #fff;
    border: 1px solid #e8eaf0;
    border-radius: 20px;
    padding: 36px 40px 40px;
    max-width: 680px;
    margin: 0 auto;
    box-shadow: 0 8px 40px rgba(0,0,0,0.07);
}

.eai-shop-back {
    background: none;
    border: none;
    color: #6D28D9;
    font-size: 0.88em;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    margin-bottom: 24px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s;
}
.eai-shop-back:hover { color: #4c1d95; }

.eai-shop-register-header {
    margin-bottom: 28px;
}
.eai-shop-register-header h2 {
    font-size: 1.55em;
    font-weight: 800;
    color: #1e1b4b;
    margin: 0 0 8px;
}
.eai-shop-register-header p {
    color: #6b7280;
    margin: 0;
    font-size: 0.97em;
}

/* ---- Form ---- */
.eai-shop-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.eai-shop-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 560px) {
    .eai-shop-form-row { grid-template-columns: 1fr; }
    .eai-shop-register-inner { padding: 24px 20px 28px; }
}

.eai-shop-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.eai-shop-field label {
    font-size: 0.8em;
    font-weight: 700;
    color: #374151;
    letter-spacing: 0.01em;
}

.eai-shop-field input {
    height: 44px;
    padding: 0 12px;
    border: 1.5px solid #d1d5db;
    border-radius: 9px;
    font-size: 0.94em;
    color: #111827;
    background: #f9fafb;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
    width: 100%;
    font-family: inherit;
}

.eai-shop-field input:focus {
    border-color: #8B5CF6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(139,92,246,0.14);
    outline: none;
}

.eai-req { color: #ef4444; }

/* ---- Messages ---- */
.eai-shop-message {
    display: none;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.92em;
    font-weight: 600;
    line-height: 1.45;
}
.eai-shop-message.success {
    display: block;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}
.eai-shop-message.error {
    display: block;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #9f1239;
}

/* ---- Terms ---- */
.eai-shop-terms {
    font-size: 0.78em;
    color: #9ca3af;
    text-align: center;
    margin: 4px 0 0;
}
.eai-shop-terms a { color: #8B5CF6; text-decoration: none; }
.eai-shop-terms a:hover { text-decoration: underline; }
