/**
 * Custom MemberPress Selector - Styles
 * Clean, modern styling for the membership selector interface
 */

/* Container */
.cmps-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Header */
.cmps-header {
    text-align: center;
    margin-bottom: 2rem;
}

.cmps-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.cmps-header p {
    font-size: 1.1rem;
    color: #7f8c8d;
    margin: 0;
}

/* Membership Tiers Section */
.cmps-tiers-section {
    margin-bottom: 2rem;
}

.cmps-section-title {
    text-align: center;
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.cmps-tiers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.cmps-tier {
    padding: 1.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.cmps-tier:hover {
    border-color: #3498db;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
    transform: translateY(-2px);
}

.cmps-tier-selected {
    border-color: #3498db !important;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2), 0 4px 12px rgba(52, 152, 219, 0.3) !important;
    transform: translateY(-4px) !important;
}

.cmps-tier-premium.cmps-tier-selected {
    border-color: #f39c12 !important;
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.2), 0 4px 12px rgba(243, 156, 18, 0.3) !important;
}

.cmps-tier-basic {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.cmps-tier-premium {
    background: linear-gradient(135deg, #fff7e6 0%, #ffe8cc 100%);
    border-color: #f39c12;
}

.cmps-tier-advanced {
    background: linear-gradient(135deg, #f0e6ff 0%, #e6ccff 100%);
    border-color: #9b59b6;
}

.cmps-tier h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    color: #2c3e50;
}

.cmps-tier-price {
    font-size: 2rem;
    font-weight: bold;
    color: #3498db;
    margin-bottom: 1rem;
}

.cmps-tier-premium .cmps-tier-price {
    color: #f39c12;
}

.cmps-tier-advanced .cmps-tier-price {
    color: #9b59b6;
}

.cmps-tier-description {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
    flex: 1;
    margin-bottom: 1rem;
}

/* Tier Select Button */
.cmps-tier-select-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    margin-top: auto;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: #3498db;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cmps-tier-select-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.cmps-tier-premium .cmps-tier-select-btn {
    background: #f39c12;
}

.cmps-tier-premium .cmps-tier-select-btn:hover {
    background: #e67e22;
    box-shadow: 0 4px 8px rgba(243, 156, 18, 0.3);
}

.cmps-tier-advanced .cmps-tier-select-btn {
    background: #9b59b6;
}

.cmps-tier-advanced .cmps-tier-select-btn:hover {
    background: #8e44ad;
    box-shadow: 0 4px 8px rgba(155, 89, 182, 0.3);
}

.cmps-tier-selected .cmps-tier-select-btn {
    background: #27ae60;
}

.cmps-tier-selected .cmps-tier-select-btn:hover {
    background: #229954;
}

.cmps-tier-selected .cmps-tier-select-btn::before {
    content: "✓ ";
}

/* Divider */
.cmps-divider {
    position: relative;
    text-align: center;
    margin: 2.5rem 0;
}

.cmps-divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, #ddd 20%, #ddd 80%, transparent);
}

.cmps-divider span {
    position: relative;
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: white;
    color: #7f8c8d;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 2px;
    z-index: 1;
}

/* Form Steps */
.cmps-form {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
}

.cmps-step {
    animation: fadeIn 0.3s ease;
}

.cmps-step h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-size: 1.5rem;
    text-align: center;
}

/* Amount Input */
.cmps-amount-input-wrapper {
    position: relative;
    max-width: 300px;
    margin: 0 auto 1.5rem;
}

.cmps-currency-symbol {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: bold;
    color: #7f8c8d;
}

.cmps-amount-input {
    width: 100%;
    padding: 1rem 1rem 1rem 2.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    border: 2px solid #ddd;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.cmps-amount-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Payment Type Selection */
.cmps-payment-type {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cmps-payment-option {
    display: flex;
    align-items: center;
    padding: 1.25rem;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cmps-payment-option:hover {
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.15);
}

.cmps-payment-option input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 1rem;
    cursor: pointer;
}

.cmps-payment-option input[type="radio"]:checked + .cmps-payment-label {
    color: #3498db;
}

.cmps-payment-option:has(input:checked) {
    border-color: #3498db;
    background: #f0f8ff;
}

.cmps-payment-label {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cmps-payment-label strong {
    font-size: 1.1rem;
    color: #2c3e50;
}

.cmps-payment-desc {
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* Preview Box */
.cmps-preview {
    margin: 1.5rem 0;
    animation: slideDown 0.3s ease;
}

.cmps-preview-box {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
}

.cmps-preview-basic {
    border-color: #3498db;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
}

.cmps-preview-premium {
    border-color: #f39c12;
    background: linear-gradient(135deg, #fff7e6 0%, #ffe8cc 100%);
}

.cmps-preview-none {
    border-color: #95a5a6;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.cmps-preview-icon {
    font-size: 3rem;
    line-height: 1;
}

.cmps-preview-content {
    flex: 1;
}

.cmps-preview-content h4 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

.cmps-preview-amount {
    font-size: 1.75rem;
    font-weight: bold;
    color: #3498db;
    margin-bottom: 0.5rem;
}

.cmps-preview-premium .cmps-preview-amount {
    color: #f39c12;
}

.cmps-preview-message {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}

.cmps-preview-loading {
    text-align: center;
    padding: 2rem;
    color: #7f8c8d;
    font-style: italic;
}

/* Buttons */
.cmps-btn {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cmps-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cmps-btn-next,
.cmps-btn-primary {
    background: #3498db;
    color: white;
    width: 100%;
}

.cmps-btn-next:hover:not(:disabled),
.cmps-btn-primary:hover:not(:disabled) {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.cmps-btn-secondary {
    background: #95a5a6;
    color: white;
}

.cmps-btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-1px);
}

/* Action Buttons Group */
.cmps-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.cmps-actions .cmps-btn {
    flex: 1;
}

/* Loading State */
.cmps-loading {
    text-align: center;
    padding: 3rem;
}

.cmps-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.cmps-loading p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* Error Message */
.cmps-error-message,
.cmps-error {
    padding: 1rem;
    margin: 1rem 0;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 6px;
    color: #c33;
    text-align: center;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .cmps-container {
        padding: 1.5rem;
        margin: 1rem;
    }

    .cmps-header h2 {
        font-size: 1.5rem;
    }

    .cmps-header p {
        font-size: 1rem;
    }

    .cmps-tiers {
        grid-template-columns: 1fr;
    }

    .cmps-form {
        padding: 1.5rem;
    }

    .cmps-step h3 {
        font-size: 1.25rem;
    }

    .cmps-amount-input {
        font-size: 1.25rem;
    }

    .cmps-preview-box {
        flex-direction: column;
        text-align: center;
    }

    .cmps-preview-icon {
        font-size: 2.5rem;
    }

    .cmps-actions {
        flex-direction: column-reverse;
    }

    .cmps-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .cmps-container {
        margin: 0.5rem;
        padding: 1rem;
    }

    .cmps-header h2 {
        font-size: 1.25rem;
    }

    .cmps-tier h3 {
        font-size: 1.25rem;
    }

    .cmps-tier-price {
        font-size: 1.5rem;
    }
}
