/**
 * PayFast Subscriptions - Public Styles
 */

/* Form container */
.pfs-form-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
}

/* Form header */
.pfs-form-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.pfs-form-header h3 {
    margin: 0 0 10px 0;
    font-size: 1.5em;
    color: #333;
}

.pfs-tier-amount {
    font-size: 1.2em;
    color: #007bff;
    font-weight: 600;
}

/* Form fields */
.pfs-form-group {
    margin-bottom: 20px;
}

.pfs-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.pfs-form-group input[type="text"],
.pfs-form-group input[type="email"],
.pfs-form-group input[type="tel"],
.pfs-form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

.pfs-form-group input:focus,
.pfs-form-group select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.pfs-form-group .description {
    margin-top: 5px;
    font-size: 0.85em;
    color: #666;
}

/* Submit button */
.pfs-submit-button {
    display: block;
    width: 100%;
    padding: 15px 20px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.pfs-submit-button:hover {
    background-color: #0056b3;
}

.pfs-submit-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Messages */
.pfs-success {
    padding: 15px 20px;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    color: #155724;
    margin-bottom: 20px;
}

.pfs-error {
    padding: 15px 20px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
    margin-bottom: 20px;
}

.pfs-notice {
    padding: 15px 20px;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    color: #856404;
    margin-bottom: 20px;
}

.pfs-notice a,
.pfs-error a,
.pfs-success a {
    color: inherit;
    text-decoration: underline;
}

/* Loading state */
.pfs-loading-payment {
    text-align: center;
    padding: 40px;
}

.pfs-loading-payment p {
    font-size: 1.2em;
    color: #666;
}

/* Subscription management */
.pfs-subscriptions {
    max-width: 800px;
    margin: 0 auto;
}

.pfs-subscription-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.pfs-subscription-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.pfs-subscription-name {
    font-size: 1.3em;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.pfs-subscription-amount {
    font-size: 1.2em;
    color: #007bff;
    font-weight: 600;
}

.pfs-subscription-details {
    margin-bottom: 20px;
}

.pfs-subscription-details p {
    margin: 8px 0;
    color: #666;
}

.pfs-subscription-details strong {
    color: #333;
}

.pfs-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
}

.pfs-status-badge.active {
    background-color: #d4edda;
    color: #155724;
}

.pfs-status-badge.cancelled {
    background-color: #f8d7da;
    color: #721c24;
}

/* Subscription actions */
.pfs-subscription-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pfs-button {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.pfs-button-primary {
    background-color: #007bff;
    color: #fff;
}

.pfs-button-primary:hover {
    background-color: #0056b3;
    color: #fff;
}

.pfs-button-danger {
    background-color: #dc3545;
    color: #fff;
}

.pfs-button-danger:hover {
    background-color: #c82333;
    color: #fff;
}

.pfs-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.pfs-button-small {
    padding: 6px 12px;
    font-size: 13px;
}

.pfs-button-link {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    padding: 0;
    font-size: inherit;
    text-decoration: underline;
    margin-left: 10px;
}

.pfs-button-link:hover {
    color: #0056b3;
}

/* Change payment day form */
.pfs-change-payment-day-form {
    margin-top: 10px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pfs-change-payment-day-form label {
    font-weight: 500;
    color: #333;
}

.pfs-change-payment-day-form select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.pfs-change-payment-day-form select:focus {
    outline: none;
    border-color: #007bff;
}

/* Payment history */
.pfs-payment-history {
    margin-top: 20px;
}

.pfs-payment-history h4 {
    margin: 0 0 15px 0;
    font-size: 1.1em;
    color: #333;
}

.pfs-payment-history table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.pfs-payment-history th,
.pfs-payment-history td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.pfs-payment-history th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.pfs-payment-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.85em;
    font-weight: 500;
}

.pfs-payment-status.success {
    background-color: #d4edda;
    color: #155724;
}

.pfs-payment-status.failed {
    background-color: #f8d7da;
    color: #721c24;
}

.pfs-payment-status.pending {
    background-color: #fff3cd;
    color: #856404;
}

/* No subscriptions */
.pfs-no-subscriptions {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

/* Login prompt */
.pfs-login-prompt {
    text-align: center;
    padding: 40px 20px;
}

.pfs-login-prompt a {
    color: #007bff;
}

/* Responsive */
@media (max-width: 600px) {
    .pfs-subscription-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .pfs-subscription-amount {
        margin-top: 10px;
    }

    .pfs-subscription-actions {
        flex-direction: column;
    }

    .pfs-button {
        width: 100%;
        text-align: center;
    }

    .pfs-payment-history table {
        font-size: 0.8em;
    }

    .pfs-payment-history th,
    .pfs-payment-history td {
        padding: 8px 5px;
    }
}
