/* استایل‌های افزونه Order Tracking by Phone */

/* تنظیمات کلی */
.otbp-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 0 15px;
    font-family: 'IRANSans', 'Tahoma', sans-serif;
    direction: rtl;
    text-align: right;
}

.otbp-form-wrapper {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 30px;
    border: 1px solid #e5e7eb;
}

/* عنوان */
.otbp-title {
    color: #1f2937;
    font-size: 24px;
    font-weight: bold;
    margin: 0 0 25px 0;
    text-align: center;
    border-bottom: 2px solid #3b82f6;
    padding-bottom: 15px;
}

/* فرم */
.otbp-form {
    margin-bottom: 25px;
}

.otbp-input-group {
    margin-bottom: 20px;
}

.otbp-label {
    display: block;
    color: #374151;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.otbp-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #ffffff;
    color: #1f2937;
    box-sizing: border-box;
}

.otbp-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.otbp-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.otbp-submit-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

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

.otbp-submit-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* لودینگ */
.otbp-loading {
    text-align: center;
    padding: 20px;
    color: #6b7280;
}

.otbp-spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

/* نتایج */
.otbp-results {
    margin-top: 25px;
}

.otbp-success {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 20px;
}

.otbp-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 20px;
    color: #dc2626;
    text-align: center;
}

.otbp-orders-list {
    margin-top: 20px;
}

.otbp-order-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.otbp-order-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.otbp-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.otbp-order-number {
    font-size: 18px;
    font-weight: bold;
    color: #1f2937;
}

.otbp-order-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.otbp-status-pending {
    background: #fef3c7;
    color: #d97706;
}

.otbp-status-processing {
    background: #dbeafe;
    color: #2563eb;
}

.otbp-status-completed {
    background: #d1fae5;
    color: #059669;
}

.otbp-status-cancelled,
.otbp-status-failed {
    background: #fecaca;
    color: #dc2626;
}

.otbp-status-on-hold {
    background: #f3f4f6;
    color: #6b7280;
}

.otbp-order-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.otbp-detail-item {
    display: flex;
    flex-direction: column;
}

.otbp-detail-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 4px;
}

.otbp-detail-value {
    color: #1f2937;
    font-weight: 500;
}

.otbp-products-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.otbp-products-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
}

.otbp-product-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.otbp-product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.otbp-product-item:last-child {
    border-bottom: none;
}

.otbp-product-name {
    color: #1f2937;
    font-weight: 500;
}

.otbp-product-quantity {
    background: #f3f4f6;
    color: #6b7280;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .otbp-container {
        margin: 10px auto;
        padding: 0 10px;
    }
    
    .otbp-form-wrapper {
        padding: 20px;
    }
    
    .otbp-title {
        font-size: 20px;
    }
    
    .otbp-order-details {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .otbp-order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .otbp-order-number {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .otbp-form-wrapper {
        padding: 15px;
        margin: 10px;
    }
    
    .otbp-input {
        font-size: 16px; /* جلوگیری از zoom در iOS */
    }
    
    .otbp-submit-btn {
        font-size: 16px;
    }
}

/* انیمیشن‌های اضافی */
.otbp-order-card {
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* تنظیمات راست به چپ */
.otbp-container * {
    direction: rtl;
    text-align: right;
}

/* تنظیمات فونت فارسی */
@font-face {
    font-family: 'IRANSans';
    src: url('data:font/woff2;base64,') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* پشتیبانی از حالت تاریک (در صورت نیاز) */
@media (prefers-color-scheme: dark) {
    .otbp-form-wrapper {
        background: #ffffff;
        color: #1f2937;
    }
    
    .otbp-input {
        background-color: #ffffff;
        color: #1f2937;
        border-color: #d1d5db;
    }
}

/* تنظیمات چاپ */
@media print {
    .otbp-form {
        display: none;
    }
    
    .otbp-loading {
        display: none;
    }
    
    .otbp-order-card {
        box-shadow: none;
        border: 1px solid #000;
        page-break-inside: avoid;
    }
}
        