/* استایل‌های اصلی افزونه پیگیری سفارش */
.otp-tracking-widget {
    font-family: 'Vazir', 'IRANSans', Tahoma, sans-serif;
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    direction: rtl;
}

.otp-container {
    background: #ffffff;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.otp-header {
    text-align: center;
    margin-bottom: 30px;
}

.otp-header h2 {
    color: #333;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.otp-header p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* استایل دکمه‌های انتخاب روش جستجو */
.otp-search-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}

.otp-method-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: right;
    width: 100%;
}

.otp-method-btn:hover {
    border-color: #667eea;
    background: #f0f3ff;
    transform: translateY(-2px);
}

.otp-method-btn.active {
    border-color: #667eea;
    background: #f0f3ff;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.2);
}

.otp-method-icon {
    font-size: 28px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.otp-method-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.otp-method-text strong {
    color: #333;
    font-size: 15px;
}

.otp-method-text small {
    color: #888;
    font-size: 12px;
}

.otp-search-form {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.otp-form-group {
    margin-bottom: 20px;
}

.otp-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 14px;
}

.otp-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    direction: rtl;
}

.otp-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.otp-btn {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.otp-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.otp-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.otp-btn-secondary {
    background: #f0f0f0;
    color: #333;
    margin-top: 10px;
}

.otp-btn-secondary:hover {
    background: #e0e0e0;
}

.otp-navigation {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.otp-link {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
    cursor: pointer;
}

.otp-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* استایل alert */
.otp-alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInDown 0.3s ease-out;
}

.otp-alert-error {
    background: #fff5f5;
    border: 2px solid #fc8181;
    color: #c53030;
}

.otp-alert-success {
    background: #f0fff4;
    border: 2px solid #9ae6b4;
    color: #276749;
}

.otp-alert-icon {
    font-size: 20px;
}

.otp-alert-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
}

.otp-alert-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: inherit;
    padding: 0 5px;
}

@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* استایل نتایج */
.otp-results {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.otp-order-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.otp-order-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.otp-order-card.selected {
    border-color: #667eea;
    background: #f0f3ff;
}

.otp-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.otp-order-label {
    color: #888;
    font-size: 13px;
    margin-left: 5px;
}

.otp-order-value {
    color: #333;
    font-weight: bold;
    font-size: 16px;
}

.otp-status-badge {
    background: #e2e8f0;
    color: #4a5568;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.otp-order-body {
    margin-bottom: 15px;
}

.otp-order-info {
    margin-bottom: 5px;
}

.otp-info-label {
    color: #888;
    font-size: 13px;
    margin-left: 5px;
}

.otp-info-value {
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.otp-order-items {
    color: #888;
    font-size: 13px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

.otp-no-results {
    text-align: center;
    padding: 30px;
    color: #888;
    font-size: 16px;
}

/* استایل جزئیات سفارش */
.otp-order-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.otp-order-summary {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.otp-order-summary h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.otp-summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.otp-summary-label {
    color: #666;
}

.otp-summary-value {
    color: #333;
    font-weight: 500;
}

.otp-multi-notice {
    background: #ebf8ff;
    border: 2px solid #90cdf4;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    color: #2b6cb0;
    font-size: 13px;
    line-height: 1.6;
}

.otp-items-list h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 18px;
}

.otp-item-card {
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
}

.otp-item-card.delayed {
    border-color: #f56565;
    background: #fff5f5;
}

.otp-item-card.on-time {
    border-color: #48bb78;
    background: #f0fff4;
}

.otp-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.otp-item-number {
    background: #667eea;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.otp-item-name {
    font-weight: bold;
    color: #333;
    font-size: 16px;
}

.otp-item-details {
    margin-bottom: 10px;
}

.otp-detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.otp-detail-label {
    color: #888;
    font-size: 13px;
}

.otp-detail-value {
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.otp-item-status {
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 13px;
}

.otp-item-status.delayed {
    background: #fed7d7;
    color: #c53030;
}

.otp-item-status.on-time {
    background: #c6f6d5;
    color: #276749;
}

/* استایل پشتیبانی */
.otp-support-options {
    background: #fffbeb;
    border: 2px solid #f6e05e;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.otp-support-options h3 {
    color: #975a16;
    margin-bottom: 15px;
    font-size: 16px;
}

.otp-support-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.otp-call-btn {
    text-decoration: none;
    display: inline-block;
    text-align: center;
    width: auto;
}

/* استایل فرم تیکت */
.otp-ticket-form {
    margin-top: 15px;
}

.otp-ticket-form h4 {
    color: #333;
    margin-bottom: 15px;
}

.otp-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    transition: all 0.3s ease;
}

.otp-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* استایل لودینگ */
.otp-loading {
    text-align: center;
    padding: 30px;
}

.otp-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: otp-spin 1s linear infinite;
}

@keyframes otp-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.otp-blur {
    filter: blur(2px);
    pointer-events: none;
}

/* Responsive Design */
@media (min-width: 768px) {
    .otp-search-options {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .otp-method-btn {
        flex: 1;
        min-width: 150px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .otp-method-text {
        align-items: center;
    }
}

@media (max-width: 768px) {
    .otp-tracking-widget {
        margin: 10px;
        padding: 10px;
    }
    
    .otp-container {
        padding: 20px;
    }
    
    .otp-header h2 {
        font-size: 20px;
    }
    
    .otp-input {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .otp-btn {
        font-size: 14px;
        padding: 10px 15px;
    }
    
    .otp-navigation {
        flex-direction: column;
        align-items: center;
    }
    
    .otp-support-buttons {
        flex-direction: column;
    }
    
    .otp-order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .otp-detail-row {
        flex-direction: column;
        gap: 3px;
    }
}

@media (max-width: 480px) {
    .otp-tracking-widget {
        padding: 5px;
        border-radius: 15px;
    }
    
    .otp-container {
        padding: 15px;
        border-radius: 10px;
    }
    
    .otp-item-details {
        flex-direction: column;
        gap: 5px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .otp-container {
        background: #2d3748;
    }
    
    .otp-header h2 {
        color: #e2e8f0;
    }
    
    .otp-header p {
        color: #a0aec0;
    }
    
    .otp-form-group label {
        color: #cbd5e0;
    }
    
    .otp-input {
        background: #4a5568;
        color: #e2e8f0;
        border-color: #4a5568;
    }
    
    .otp-order-card {
        background: #4a5568;
        border-color: #4a5568;
    }
    
    .otp-order-number {
        color: #e2e8f0;
    }
    
    .otp-order-info {
        color: #a0aec0;
    }
    
    .otp-item-card {
        background: #4a5568;
        border-color: #4a5568;
    }
    
    .otp-item-name {
        color: #e2e8f0;
    }
    
    .otp-method-btn {
        background: #4a5568;
        border-color: #4a5568;
    }
    
    .otp-method-text strong {
        color: #e2e8f0;
    }
    
    .otp-method-text small {
        color: #a0aec0;
    }
}