/* =========================================================
   Coaching Stripe Plugin – Frontend Styles
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }

/* ---------- Wrapper ---------- */
.csp-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #30313d;
    max-width: 460px;
    margin: 0 auto;
    padding: 8px 14px;
    width: 100%;
}

/* ---------- Checkout Section ---------- */
.csp-checkout-section {
    padding: 0;
    display: flex;
    justify-content: center;
}

.csp-checkout-card {
    background: none;
    border-radius: 0px;
    border: none;
    box-shadow: none;
    padding: 0;
    width: 100%;
}

.csp-section-title {
    margin: 0 0 12px;
    font-size: 31px;
    line-height: 1.2;
    letter-spacing: -0.2px;
    color: #30313d;
    font-weight: 500;
}

.csp-payment-title {
    margin-top: 22px;
}

/* ---------- Form ---------- */
.csp-form-group {
    margin-bottom: 12px;
}

.csp-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #30313d;
    margin-bottom: 7px;
}

.csp-required { color: #f5576c; }

.csp-tooltip {
    cursor: help;
    margin-left: 4px;
    font-size: 0.85rem;
}

.csp-form-group input[type="text"],
.csp-form-group input[type="email"] {
    width: 100%;
    height: 44px;
    padding: 10px 12px;
    border: 1px solid #cfd7df;
    border-radius: 6px;
    font-size: 16px;
    color: #30313d;
    transition: border-color 0.2s;
    outline: none;
    background: #ffffff;
}

.csp-form-group input:focus {
    border-color: #635bff;
    background: #fff;
    box-shadow: 0 0 0 1px #635bff;
}

/* Stripe Card Elements */
#csp-payment-element {
    border: none;
    border-radius: 0px;
    padding: 0px;
    background: none;
    transition: border-color 0.2s;
}

#csp-payment-element:focus-within {
    border-color: #635bff;
    background: #fff;
    box-shadow: 0 0 0 1px #635bff;
}

.csp-payment-method-box {
    border: 1px solid #d8dee5;
    border-radius: 8px;
    background: #ffffff;
    padding: 14px;
}

.csp-payment-method-label {
    display: flex;
    align-items: center;
    font-size: 30px;
    font-weight: 500;
    margin-bottom: 10px;
    color: #30313d;
}

.csp-payment-method-label::before {
    content: "";
    width: 16px;
    height: 12px;
    margin-right: 10px;
    border-radius: 2px;
    background: #111;
    display: inline-block;
    display: none;
}
.csp-payment-method-label svg.p-Icon {
    width: 16px;
    margin-right: 10px;
}

.csp-card-group {
    margin-bottom: 0;
}

#csp-card-errors {
    color: #df1b41;
    font-size: 13px;
    margin-top: 8px;
    min-height: 20px;
}

/* Submit Button */
.csp-btn-checkout {
    display: block;
    width: 100%;
    background: #0570de;
    color: #fff;
    font-size: 34px;
    font-weight: 500;
    height: 52px;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 16px;
    transition: opacity 0.2s;
    box-shadow: none;
}

.csp-btn-checkout:hover {
    opacity: 0.95;
}

.csp-btn-checkout:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ---------- Success ---------- */
.csp-success-card {
    border: 1px solid #d8dee5;
    border-radius: 8px;
    background: #ffffff;
    padding: 24px 16px;
    text-align: center;
    margin-top: 16px;
}

.csp-success-icon {
    font-size: 42px;
    line-height: 1;
    margin-bottom: 10px;
}

.csp-success-sub {
    margin: 8px 0;
    color: #4b5563;
    font-size: 15px;
}



/**************************/

/* Container and Card Styling */
.csp-checkout-card {
    background: #ffffff;
    padding: 30px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Section Titles (Contact & Payment) */
.csp-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #6d6e71;
    text-transform: none;
    margin: 25px 0 10px 0;
}

/* Form Groups & Inputs */
.csp-form-group {
    margin-bottom: 15px;
}

.csp-form-group label {
    display: block;
    font-size: 13px;
    color: #303133;
    margin-bottom: 8px;
}

.csp-form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    font-size: 15px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.csp-form-group input:focus {
    outline: none;
    border-color: #9b59b6; /* Purple focus */
}

/* Stripe Payment Method Box */
.csp-payment-method-box {
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    background-color: #ffffff;
    margin-top: 10px;
}

.csp-payment-method-label {
    padding: 12px 15px;
    font-size: 14px;
    font-weight: 600;
    color: #303133;
    border-bottom: 1px solid #e6e6e6;
    background-color: #fafafa;
}

.csp-card-group {
    padding: 20px 0px;
    margin-bottom: 0;
}

/* The Checkout Button (Purple Theme) */
.csp-btn-checkout {
    width: 100%;
    background-color: #9b59b6; /* Exact Purple from screenshot */
    color: #ffffff;
    border: none;
    padding: 16px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 25px;
    transition: background-color 0.2s, opacity 0.2s;
}

.csp-btn-checkout:hover {
    background-color: #8e44ad;
}

.csp-btn-checkout:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Required Asterisk */
.csp-required {
    color: #e74c3c;
    margin-left: 2px;
}

/* Error Handling */
#csp-card-errors {
    color: #df1b41;
    font-size: 13px;
    margin-top: 10px;
    text-align: center;
}


.csp-terms-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 14px;
    font-size: 13px;
    color: #30313d;
}

.csp-terms-check input[type="checkbox"] {
    margin-top: 2px;
    width: auto;
}

.csp-terms-text {
    width: 100%;
    margin-top: 8px;
    min-height: 140px;
    border: 1px solid #cfd7df;
    border-radius: 6px;
    background: #fff;
    padding: 10px;
    font-size: 12px;
    line-height: 1.45;
    color: #4b5563;
    resize: vertical;
}



/* ---------- Responsive ---------- */
@media (max-width: 600px) {
    .csp-checkout-card { padding: 12px; }
    .csp-section-title { font-size: 24px; }
    .csp-form-group input[type="text"],
    .csp-form-group input[type="email"] { font-size: 16px; }
    .csp-payment-method-label { font-size: 18px; }
    .csp-btn-checkout  { font-size: 20px; }
}
