/**
 * Olashoplife Tele Frontend Styles
 */

/* Payment Button Styles */
.olashoplife-tele-payment-button {
    display: inline-block;
    padding: 12px 24px;
    background-color: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.olashoplife-tele-payment-button:hover {
    background-color: #005177;
    transform: translateY(-1px);
}

.olashoplife-tele-payment-button:active {
    transform: translateY(0);
}

.olashoplife-tele-payment-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

.olashoplife-tele-payment-button.processing {
    position: relative;
    pointer-events: none;
}

.olashoplife-tele-payment-button.processing::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: olashoplife-tele-spin 0.8s linear infinite;
}

@keyframes olashoplife-tele-spin {
    to { transform: rotate(360deg); }
}

/* Payment Form Container */
.olashoplife-tele-form-container {
    max-width: 500px;
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.olashoplife-tele-form-container h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
}

.olashoplife-tele-form-group {
    margin-bottom: 15px;
}

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

.olashoplife-tele-form-group input,
.olashoplife-tele-form-group select,
.olashoplife-tele-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.olashoplife-tele-form-group input:focus,
.olashoplife-tele-form-group select:focus,
.olashoplife-tele-form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

/* Payment Summary */
.olashoplife-tele-payment-summary {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.olashoplife-tele-payment-summary .summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.olashoplife-tele-payment-summary .summary-row:last-child {
    border-bottom: none;
    font-weight: 600;
    font-size: 18px;
    color: #0073aa;
}

/* Subscription Plans */
.olashoplife-tele-plans-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.olashoplife-tele-plan-card {
    background: #fff;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.olashoplife-tele-plan-card:hover {
    border-color: #0073aa;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.15);
}

.olashoplife-tele-plan-card.selected {
    border-color: #0073aa;
    background: #f0f7fc;
}

.olashoplife-tele-plan-card .plan-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.olashoplife-tele-plan-card .plan-price {
    font-size: 28px;
    font-weight: 700;
    color: #0073aa;
    margin-bottom: 10px;
}

.olashoplife-tele-plan-card .plan-price .currency {
    font-size: 16px;
    vertical-align: top;
}

.olashoplife-tele-plan-card .plan-period {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.olashoplife-tele-plan-card .plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    text-align: left;
}

.olashoplife-tele-plan-card .plan-features li {
    padding: 5px 0;
    color: #555;
}

.olashoplife-tele-plan-card .plan-features li::before {
    content: '\2713';
    color: #0073aa;
    margin-right: 8px;
    font-weight: bold;
}

.olashoplife-tele-plan-card .plan-button {
    width: 100%;
}

/* Success Page */
.olashoplife-tele-success {
    text-align: center;
    padding: 40px 20px;
    max-width: 600px;
    margin: 0 auto;
}

.olashoplife-tele-success .success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: #0073aa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.olashoplife-tele-success .success-icon svg {
    width: 40px;
    height: 40px;
    fill: #fff;
}

.olashoplife-tele-success h2 {
    color: #333;
    margin-bottom: 10px;
}

.olashoplife-tele-success p {
    color: #666;
    font-size: 16px;
}

.olashoplife-tele-success .order-details {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: left;
}

.olashoplife-tele-success .order-details .detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.olashoplife-tele-success .order-details .detail-row:last-child {
    border-bottom: none;
}

/* Error Page */
.olashoplife-tele-error {
    text-align: center;
    padding: 40px 20px;
    max-width: 600px;
    margin: 0 auto;
}

.olashoplife-tele-error .error-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: #dc3232;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.olashoplife-tele-error .error-icon svg {
    width: 40px;
    height: 40px;
    fill: #fff;
}

.olashoplife-tele-error h2 {
    color: #333;
    margin-bottom: 10px;
}

.olashoplife-tele-error p {
    color: #666;
    font-size: 16px;
}

.olashoplife-tele-error .error-message {
    background: #fff5f5;
    border: 1px solid #dc3232;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
    color: #dc3232;
}

/* Checkout Styles */
.wc-payment-form .olashoplife-tele-checkout-form {
    margin: 20px 0;
}

.wc-payment-form .olashoplife-tele-checkout-form .form-row {
    margin-bottom: 15px;
}

.wc-payment-form .olashoplife-tele-checkout-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
}

.wc-payment-form .olashoplife-tele-checkout-form input[type="text"],
.wc-payment-form .olashoplife-tele-checkout-form input[type="email"],
.wc-payment-form .olashoplife-tele-checkout-form input[type="tel"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .olashoplife-tele-plans-container {
        grid-template-columns: 1fr;
    }

    .olashoplife-tele-form-container {
        padding: 15px;
    }

    .olashoplife-tele-payment-button {
        width: 100%;
    }
}

/* Loading Overlay */
.olashoplife-tele-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.olashoplife-tele-loading-overlay .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: olashoplife-tele-spin 0.8s linear infinite;
}

/* Messages */
.olashoplife-tele-message {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.olashoplife-tele-message.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.olashoplife-tele-message.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.olashoplife-tele-message.warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.olashoplife-tele-message.info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}
