/* WP Membership Pro – Frontend Styles */

/* Forms */
.wpmmpro-form {
    max-width: 480px;
    margin: 30px auto;
    padding: 30px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.wpmmpro-form h2 {
    margin: 0 0 24px;
    font-size: 24px;
    text-align: center;
    color: #1a1a1a;
}

.wpmmpro-field {
    margin-bottom: 18px;
}

.wpmmpro-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.wpmmpro-field input[type="text"],
.wpmmpro-field input[type="email"],
.wpmmpro-field input[type="password"],
.wpmmpro-field input[type="number"],
.wpmmpro-field select,
.wpmmpro-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color .2s;
    box-sizing: border-box;
}

.wpmmpro-field input:focus,
.wpmmpro-field select:focus,
.wpmmpro-field textarea:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(34,113,177,.15);
}

.wpmmpro-field-row {
    display: flex;
    gap: 16px;
}

.wpmmpro-field-half {
    flex: 1;
}

.wpmmpro-field-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    cursor: pointer;
}

.wpmmpro-hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #757575;
}

.required {
    color: #d63638;
}

/* Buttons */
.wpmmpro-button {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all .2s;
}

.wpmmpro-button-primary {
    width: 100%;
    background: #2271b1;
    color: #fff;
}

.wpmmpro-button-primary:hover {
    background: #135e96;
    color: #fff;
}

.wpmmpro-button-small {
    padding: 6px 16px;
    font-size: 13px;
    background: #f0f0f1;
    color: #333;
}

.wpmmpro-button-small:hover {
    background: #ddd;
    color: #333;
}

/* Alerts */
.wpmmpro-alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.wpmmpro-alert-error {
    background: #fce4e4;
    color: #8b0000;
    border: 1px solid #f5c6c6;
}

.wpmmpro-alert-success {
    background: #e7f7e7;
    color: #0a5c0a;
    border: 1px solid #b8e6b8;
}

.wpmmpro-alert-warning {
    background: #fff8e1;
    color: #795600;
    border: 1px solid #ffe082;
}

/* Form Links */
.wpmmpro-form-links {
    margin-top: 20px;
    text-align: center;
    font-size: 13px;
}

.wpmmpro-form-links a {
    color: #2271b1;
    text-decoration: none;
}

.wpmmpro-form-links a:hover {
    text-decoration: underline;
}

.wpmmpro-divider {
    margin: 0 8px;
    color: #ccc;
}

/* Account Page */
.wpmmpro-account {
    max-width: 800px;
    margin: 20px auto;
}

.wpmmpro-account-header {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 24px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 24px;
}

.wpmmpro-account-header h2 {
    margin: 0;
    flex: 1;
}

.wpmmpro-account-email {
    color: #757575;
    margin: 0;
}

.wpmmpro-account-section {
    margin-bottom: 30px;
}

.wpmmpro-account-section h3 {
    font-size: 20px;
    margin-bottom: 16px;
    color: #1a1a1a;
}

/* Membership Cards */
.wpmmpro-memberships-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wpmmpro-membership-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.wpmmpro-membership-active {
    border-left: 4px solid #00a32a;
}

.wpmmpro-membership-expired {
    border-left: 4px solid #d63638;
}

.wpmmpro-membership-cancelled {
    border-left: 4px solid #d63638;
    opacity: 0.7;
}

.wpmmpro-membership-pending {
    border-left: 4px solid #dba617;
}

.wpmmpro-membership-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.wpmmpro-membership-header h4 {
    margin: 0;
    font-size: 16px;
}

.wpmmpro-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wpmmpro-badge-active { background: #e7f7e7; color: #0a5c0a; }
.wpmmpro-badge-expired { background: #fce4e4; color: #8b0000; }
.wpmmpro-badge-cancelled { background: #fce4e4; color: #8b0000; }
.wpmmpro-badge-pending { background: #fff8e1; color: #795600; }
.wpmmpro-badge-paused { background: #fff8e1; color: #795600; }

.wpmmpro-membership-details {
    padding: 16px 20px;
}

.wpmmpro-membership-details p {
    margin: 4px 0;
    font-size: 14px;
    color: #555;
}

.wpmmpro-membership-content {
    padding: 0 20px 20px;
}

.wpmmpro-membership-content h5 {
    margin: 16px 0 8px;
    font-size: 14px;
    color: #333;
}

.wpmmpro-content-links,
.wpmmpro-content-locked {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wpmmpro-content-links li,
.wpmmpro-content-locked li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.wpmmpro-content-links li:last-child,
.wpmmpro-content-locked li:last-child {
    border-bottom: none;
}

.wpmmpro-content-links a {
    color: #2271b1;
    text-decoration: none;
}

.wpmmpro-content-links a:hover {
    text-decoration: underline;
}

.wpmmpro-content-locked li {
    color: #999;
}

.wpmmpro-lock-icon {
    margin-right: 6px;
}

.wpmmpro-no-memberships {
    padding: 40px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
    color: #757575;
}

/* Restricted Content */
.wpmmpro-restricted-content {
    padding: 30px;
    text-align: center;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin: 20px 0;
}

.wpmmpro-restricted-content .wpmmpro-login-link {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 24px;
    background: #2271b1;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
}

.wpmmpro-teaser {
    position: relative;
}

.wpmmpro-teaser::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(transparent, #fff);
    pointer-events: none;
}

/* Product List */
.wpmmpro-product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.wpmmpro-product-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
}

.wpmmpro-product-card h3 {
    margin: 0 0 10px;
    font-size: 20px;
}

.wpmmpro-price {
    font-size: 24px;
    font-weight: 700;
    color: #2271b1;
    margin: 16px 0;
}

/* Content List */
.wpmmpro-content-list h3 {
    margin-bottom: 12px;
}

.wpmmpro-available-content,
.wpmmpro-locked-content {
    list-style: none;
    padding: 0;
}

.wpmmpro-available-content li,
.wpmmpro-locked-content li {
    padding: 10px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.wpmmpro-locked-content li.locked {
    color: #999;
}

/* Checkout Buttons */
.wpmmpro-checkout-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.wpmmpro-checkout-btn {
    flex: 1;
    min-width: 140px;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all .2s;
}

.wpmmpro-checkout-stripe {
    background: #635bff;
    color: #fff;
}

.wpmmpro-checkout-stripe:hover {
    background: #4b44c7;
}

.wpmmpro-checkout-paypal {
    background: #ffc439;
    color: #111;
}

.wpmmpro-checkout-paypal:hover {
    background: #e6b000;
}

/* Responsive */
@media (max-width: 600px) {
    .wpmmpro-form {
        margin: 15px;
        padding: 20px;
    }

    .wpmmpro-field-row {
        flex-direction: column;
        gap: 0;
    }

    .wpmmpro-account-header {
        flex-direction: column;
        text-align: center;
    }

    .wpmmpro-membership-header {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}
