/**
 * RL PrepAid Manager - eSIM Pages Styles
 */

/* RTL Support */
.rlpm-esim-wrapper {
    direction: rtl;
    text-align: right;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
}

.rlpm-esim-wrapper * {
    box-sizing: border-box;
}

/* Container */
.rlpm-esim-container {
    max-width: 520px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Header */
.rlpm-esim-header {
    text-align: center;
    margin-bottom: 30px;
}

.rlpm-esim-header .rlpm-logo {
    font-size: 64px;
    margin-bottom: 15px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.rlpm-esim-header h1 {
    margin: 0 0 10px;
    font-size: 28px;
    color: #1e3a5f;
    font-weight: 700;
}

.rlpm-subtitle {
    margin: 0;
    color: #64748b;
    font-size: 16px;
}

/* Content */
.rlpm-esim-content {
    background: #fff;
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
    margin-bottom: 30px;
}

/* QR Code Container */
.rlpm-qr-container {
    text-align: center;
    margin-bottom: 30px;
}

.qr-code-wrapper {
    display: inline-block;
    padding: 20px;
    background: #f8fafc;
    border-radius: 16px;
    border: 2px dashed #e2e8f0;
    margin-bottom: 20px;
}

.qr-code-image {
    max-width: 250px;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.qr-placeholder {
    width: 200px;
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

.qr-placeholder .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
}

/* Instructions */
.qr-instructions {
    text-align: right;
    background: #f0f9ff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #bae6fd;
}

.qr-instructions h3 {
    margin: 0 0 15px;
    color: #0369a1;
    font-size: 16px;
}

.qr-instructions ol {
    margin: 0;
    padding-right: 20px;
    color: #0c4a6e;
}

.qr-instructions li {
    margin-bottom: 8px;
}

/* Activation Section */
.rlpm-activation-section {
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.rlpm-activation-section h3 {
    margin: 0 0 10px;
    color: #1e3a5f;
}

.rlpm-activation-section p {
    color: #64748b;
    margin-bottom: 20px;
}

/* Order Details */
.rlpm-order-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.order-detail-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.order-detail-card.highlight {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
}

.detail-icon {
    font-size: 28px;
}

.detail-info {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
}

.detail-value {
    font-size: 18px;
    font-weight: 700;
    color: #1e3a5f;
    direction: ltr;
    text-align: right;
}

/* Topup Section */
.rlpm-topup-section {
    text-align: center;
}

.topup-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    background: #fef3c7;
    border-radius: 10px;
    margin-bottom: 20px;
    color: #92400e;
}

.notice-icon {
    font-size: 20px;
}

.topup-notice p {
    margin: 0;
    font-weight: 500;
}

/* Submit Button */
.rlpm-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff !important;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    width: 100%;
}

.rlpm-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    color: #fff;
}

.rlpm-submit-btn:active {
    transform: translateY(0);
}

.rlpm-submit-btn-large {
    padding: 20px 40px;
    font-size: 20px;
}

.btn-icon {
    font-size: 22px;
}

/* Loading State */
.rlpm-loading {
    text-align: center;
    padding: 40px 20px;
}

.rlpm-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top-color: #667eea;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

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

.rlpm-loading p {
    color: #64748b;
    font-size: 16px;
    margin: 0;
}

/* Result States */
.rlpm-result {
    text-align: center;
    padding: 30px;
}

.result-icon {
    font-size: 72px;
    margin-bottom: 20px;
}

.rlpm-result h2 {
    margin: 0 0 15px;
    font-size: 24px;
    color: #1e3a5f;
}

.result-message {
    color: #64748b;
    margin-bottom: 20px;
}

.rlpm-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-radius: 16px;
}

.rlpm-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-radius: 16px;
}

.rlpm-info {
    background: #e0f2fe;
    color: #0369a1;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin: 20px 0 0;
}

/* Result Details */
.result-details {
    background: rgba(255,255,255,0.5);
    border-radius: 12px;
    padding: 15px;
    margin: 15px 0;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-item .detail-label {
    color: #64748b;
    font-size: 14px;
}

.detail-item .detail-value {
    font-weight: 700;
    font-size: 20px;
    color: #1e3a5f;
}

/* Retry Button */
.rlpm-retry-btn {
    padding: 12px 30px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 15px;
}

.rlpm-retry-btn:hover {
    background: #5a6fd6;
}

/* Success Celebration */
.success-celebration {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    font-size: 32px;
    opacity: 0;
    transform: scale(0);
    transition: all 0.5s ease;
}

.success-celebration.animate {
    opacity: 1;
    transform: scale(1);
}

.success-celebration span {
    animation: bounce-emoji 0.6s ease infinite;
}

.success-celebration span:nth-child(2) {
    animation-delay: 0.2s;
}

.success-celebration span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce-emoji {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* Help Section */
.rlpm-help-section {
    padding: 25px;
    background: #f8fafc;
    border-radius: 16px;
}

.rlpm-help-section h3 {
    margin: 0 0 15px;
    font-size: 16px;
    color: #1e3a5f;
}

.help-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.help-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #64748b;
}

.help-icon {
    font-size: 18px;
}

/* Responsive */
@media screen and (max-width: 520px) {
    .rlpm-esim-container {
        margin: 20px auto;
    }
    
    .rlpm-esim-content {
        padding: 25px 20px;
    }
    
    .rlpm-esim-header .rlpm-logo {
        font-size: 48px;
    }
    
    .rlpm-esim-header h1 {
        font-size: 22px;
    }
    
    .qr-code-image {
        max-width: 200px;
    }
    
    .rlpm-submit-btn {
        font-size: 16px;
        padding: 14px 24px;
    }
    
    .rlpm-submit-btn-large {
        font-size: 18px;
        padding: 16px 30px;
    }
}

