/* ============================================================
   WooCommerce Order Tracker - Minimal Style
   Version: 4.0.0
   ============================================================ */

/* ---------- Wrap & Background ---------- */
.wcot-wrap {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 15px;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    direction: rtl;
    background: #f8fafc;
    border-radius: 20px;
}

/* ---------- Glass Card ---------- */
.wcot-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 500px;
    padding: 35px 30px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05),
                0 0 0 1px rgba(0, 0, 0, 0.02);
    animation: wcotSlideUp 0.5s ease-out;
}

@keyframes wcotSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.wcot-header {
    text-align: center;
    margin-bottom: 25px;
}
.wcot-header h2 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 800;
    color: #1e293b;
}
.wcot-header p {
    margin: 0;
    font-size: 14px;
    color: #64748b;
}

/* ---------- Form ---------- */
.wcot-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.wcot-field input {
    width: 100%;
    padding: 16px;
    font-size: 15px;
    color: #1e293b;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-family: inherit;
    text-align: center;
    letter-spacing: 1px;
}
.wcot-field input::placeholder {
    color: #94a3b8;
    letter-spacing: 0;
}
.wcot-field input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* ---------- Button ---------- */
.wcot-btn {
    position: relative;
    padding: 16px;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    background: #1e293b;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}
.wcot-btn:hover {
    background: #0f172a;
    transform: translateY(-1px);
}
.wcot-btn:active {
    transform: translateY(0);
}
.wcot-btn.loading .wcot-btn-text { opacity: 0; }
.wcot-btn.loading .wcot-spinner { display: block; }

.wcot-spinner {
    display: none;
    position: absolute;
    top: 50%; left: 50%;
    width: 20px; height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wcotSpin 0.8s linear infinite;
}
@keyframes wcotSpin { to { transform: rotate(360deg); } }

/* ---------- Message ---------- */
.wcot-message {
    margin-top: 16px;
    padding: 12px;
    border-radius: 10px;
    font-size: 13px;
    text-align: center;
    display: none;
    animation: wcotSlideUp 0.3s ease-out;
}
.wcot-message.error {
    display: block;
    background: #fee2e2;
    color: #ef4444;
    border: 1px solid #fecaca;
}

/* ---------- Help Box ---------- */
.wcot-help {
    margin-top: 18px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    animation: wcotSlideUp 0.6s ease-out;
}
.wcot-help-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.wcot-help-icon { font-size: 16px; }
.wcot-help-title {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
}
.wcot-help-list {
    margin: 0;
    padding: 0 18px 0 0;
    list-style: disc;
    font-size: 12px;
    line-height: 1.9;
    color: #475569;
}
.wcot-help-list li { margin-bottom: 4px; }
.wcot-help-list li:last-child { margin-bottom: 0; }
.wcot-help-list strong { color: #1e293b; font-weight: 700; }

/* ---------- Orders List ---------- */
.wcot-orders-list {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wcot-order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    animation: wcotSlideUp 0.4s ease-out backwards;
}
.wcot-order-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.wcot-order-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.wcot-order-id {
    font-weight: 800;
    color: #1e293b;
    font-size: 15px;
}
.wcot-order-meta {
    font-size: 12px;
    color: #64748b;
}
.wcot-order-price {
    font-weight: 700;
    color: #1e293b;
    font-size: 14px;
}

.wcot-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    margin-top: 4px;
}

/* ---------- Modal ---------- */
.wcot-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.wcot-modal.open {
    display: flex;
    opacity: 1;
}

.wcot-modal-content {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px 25px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.95);
    transition: transform 0.3s ease;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
.wcot-modal.open .wcot-modal-content {
    transform: scale(1);
}

/* اسکرول‌بار سفارشی */
.wcot-modal-content::-webkit-scrollbar { width: 6px; }
.wcot-modal-content::-webkit-scrollbar-track { background: transparent; }
.wcot-modal-content::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 10px;
}

.wcot-modal-close {
    position: absolute;
    top: 15px; left: 15px;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #94a3b8;
    transition: 0.2s;
    background: #f1f5f9;
    width: 32px; height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 10;
}
.wcot-modal-close:hover {
    color: #1e293b;
    background: #e2e8f0;
}

/* ---------- Modal Content ---------- */
.wcot-detail-title {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 4px;
    color: #0f172a;
}
.wcot-detail-sub {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 20px;
}

.wcot-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}
.wcot-info-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    font-size: 13px;
    color: #1e293b;
}
.wcot-info-item span {
    display: block;
    color: #64748b;
    font-size: 11px;
    margin-bottom: 4px;
}
.wcot-info-item strong { font-weight: 700; }

/* Progress bar */
.wcot-progress {
    height: 6px;
    border-radius: 6px;
    background: #e2e8f0;
    overflow: hidden;
    margin: 10px 0 25px;
}
.wcot-progress-fill {
    height: 100%;
    width: 0;
    background: #3b82f6;
    border-radius: 6px;
    transition: width 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Items */
.wcot-items-list {
    margin-top: 10px;
    background: #f8fafc;
    border-radius: 12px;
    padding: 10px 15px;
    border: 1px solid #e2e8f0;
}
.wcot-item-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 13px;
    color: #1e293b;
    gap: 10px;
}
.wcot-item-row:last-child { border-bottom: none; }

/* ---------- Tracking Card ---------- */
.wcot-tracking-box {
    margin: 20px 0;
    padding: 18px;
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
    border: 1.5px dashed #93c5fd;
    border-radius: 14px;
    animation: wcotSlideUp 0.5s ease-out;
}
.wcot-tracking-box.wcot-tracking-empty {
    background: #f8fafc;
    border-color: #cbd5e1;
    border-style: solid;
}
.wcot-tracking-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.wcot-tracking-icon { font-size: 18px; }
.wcot-tracking-title {
    font-size: 13px;
    font-weight: 700;
    color: #1e40af;
}
.wcot-tracking-empty .wcot-tracking-title { color: #64748b; }

.wcot-tracking-value {
    font-family: 'Courier New', monospace;
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 2px;
    padding: 12px;
    background: #fff;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #dbeafe;
    margin-bottom: 12px;
    direction: ltr;
    user-select: all;
    word-break: break-all;
}

.wcot-tracking-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.wcot-copy-btn,
.wcot-post-link {
    flex: 1;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
    font-family: inherit;
    border: none;
    display: inline-block;
    box-sizing: border-box;
}
.wcot-copy-btn {
    background: #1e293b;
    color: #fff;
}
.wcot-copy-btn:hover {
    background: #0f172a;
    transform: translateY(-1px);
}
.wcot-copy-btn.copied { background: #10b981; }

.wcot-post-link {
    background: #fff;
    color: #1e40af;
    border: 1px solid #93c5fd;
}
.wcot-post-link:hover {
    background: #eff6ff;
    transform: translateY(-1px);
}

.wcot-tracking-empty p {
    font-size: 12px;
    color: #64748b;
    margin: 0;
    text-align: center;
    line-height: 1.7;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
    .wcot-card {
        padding: 25px 20px;
        border-radius: 20px;
    }
    .wcot-header h2 { font-size: 20px; }
    .wcot-header p  { font-size: 13px; }
    .wcot-info-grid { grid-template-columns: 1fr; }
    .wcot-tracking-value {
        font-size: 16px;
        letter-spacing: 1px;
    }
    .wcot-tracking-actions { flex-direction: column; }
    .wcot-modal-content {
        padding: 25px 18px;
        border-radius: 16px;
    }
    .wcot-detail-title { font-size: 18px; }
}