/**
 * TASAWWQ Engage - Frontend Stylesheet
 * 100% Mobile-First, RTL-ready & Native Theme CSS Variables
 */

.tasawwq-auction-wrapper {
    font-family: var(--tasawwq-font-family, 'Cairo', 'Tajawal', sans-serif);
    background: #ffffff;
    border: 1px solid var(--tasawwq-border-color, #e2e8f0);
    border-radius: var(--tasawwq-radius, 12px);
    padding: 20px;
    box-shadow: var(--tasawwq-shadow-md, 0 4px 16px rgba(0,0,0,0.06));
    margin: 20px 0;
    direction: rtl;
    text-align: right;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.tasawwq-auction-wrapper * {
    box-sizing: border-box;
}

/* Header & Badges */
.tasawwq-auction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.tasawwq-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fee2e2;
    color: var(--tasawwq-primary, #dd3333);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
}

.tasawwq-pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--tasawwq-primary, #dd3333);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(221, 51, 51, 0.7);
    animation: tasawwq-pulse 1.5s infinite;
}

@keyframes tasawwq-pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(221, 51, 51, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(221, 51, 51, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(221, 51, 51, 0); }
}

.tasawwq-bidders-count {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    background: #f8fafc;
    padding: 6px 12px;
    border-radius: 50px;
}

.tasawwq-count-num {
    font-weight: 800;
    color: #1e293b;
}

/* Extension Alert */
.tasawwq-extension-alert {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 1px solid #fed7aa;
    color: #c2410c;
    padding: 10px 16px;
    border-radius: var(--tasawwq-radius, 8px);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 14px;
    animation: tasawwq-shake 0.6s ease-in-out;
}

@keyframes tasawwq-shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

.tasawwq-ext-flame {
    font-size: 20px;
    animation: tasawwq-bounce 1s infinite;
}

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

/* Grid: Price & Countdown */
.tasawwq-auction-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    .tasawwq-auction-grid {
        grid-template-columns: 1fr;
    }
}

.tasawwq-price-box, .tasawwq-timer-box {
    background: var(--tasawwq-bg-light, #fff9f9);
    border: 1px solid rgba(221, 51, 51, 0.1);
    border-radius: var(--tasawwq-radius, 10px);
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tasawwq-box-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 6px;
}

.tasawwq-current-price {
    font-size: 28px;
    font-weight: 900;
    color: var(--tasawwq-primary, #dd3333);
    line-height: 1.2;
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.tasawwq-current-price .tasawwq-currency {
    font-size: 16px;
    font-weight: 600;
    color: #64748b;
}

.tasawwq-bidder-info {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #334155;
    font-weight: 600;
}

.tasawwq-avatar-wrap img.tasawwq-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    vertical-align: middle;
}

.tasawwq-avatar-placeholder {
    font-size: 16px;
}

.tasawwq-you-pill {
    background: #fef08a;
    color: #854d0e;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 700;
}

/* Countdown */
.tasawwq-countdown {
    display: flex;
    align-items: center;
    gap: 6px;
    direction: ltr; /* Timer numerals left-to-right */
    justify-content: flex-end;
}

.tasawwq-time-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    min-width: 48px;
    padding: 6px 4px;
}

.tasawwq-time-unit .tasawwq-num {
    font-size: 20px;
    font-weight: 900;
    color: #0f172a;
    font-family: monospace, sans-serif;
    line-height: 1;
}

.tasawwq-time-unit .tasawwq-lbl {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 2px;
}

.tasawwq-time-unit-seconds .tasawwq-num {
    color: var(--tasawwq-primary, #dd3333);
}

.tasawwq-time-sep {
    font-size: 18px;
    font-weight: 900;
    color: #94a3b8;
}

.tasawwq-timer-subtext {
    margin-top: 10px;
    font-size: 11px;
    color: #64748b;
}

.tasawwq-ended-badge {
    color: #dc2626;
    font-weight: 800;
}

/* Action Area */
.tasawwq-bid-action-area {
    margin-bottom: 20px;
}

.tasawwq-quick-increments {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.tasawwq-inc-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}

.tasawwq-inc-btn {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 5px 12px;
    border-radius: var(--tasawwq-radius, 6px);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.tasawwq-inc-btn:hover {
    background: var(--tasawwq-primary, #dd3333);
    color: #ffffff;
    border-color: var(--tasawwq-primary, #dd3333);
}

.tasawwq-bid-input-row {
    display: flex;
    gap: 10px;
}

.tasawwq-input-group {
    position: relative;
    flex: 1;
}

.tasawwq-bid-input {
    width: 100%;
    height: 48px;
    border: 2px solid #cbd5e1;
    border-radius: var(--tasawwq-radius, 8px);
    padding: 8px 50px 8px 16px;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    font-family: inherit;
    transition: border-color 0.2s;
}

.tasawwq-bid-input:focus {
    outline: none;
    border-color: var(--tasawwq-primary, #dd3333);
}

.tasawwq-input-suffix {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: 700;
    color: #64748b;
    pointer-events: none;
}

.tasawwq-bid-submit-btn {
    background: var(--tasawwq-primary, #dd3333);
    color: #ffffff;
    border: none;
    border-radius: var(--tasawwq-radius, 8px);
    padding: 0 24px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    font-family: inherit;
    min-width: 140px;
    justify-content: center;
}

.tasawwq-bid-submit-btn:hover {
    background: var(--tasawwq-primary-hover, #bb2222);
    box-shadow: 0 4px 12px rgba(221, 51, 51, 0.3);
}

.tasawwq-bid-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.tasawwq-bid-feedback {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    min-height: 20px;
}

.tasawwq-bid-feedback.is-success {
    color: #15803d;
}

.tasawwq-bid-feedback.is-error {
    color: #b91c1c;
}

/* Closed Card */
.tasawwq-auction-closed-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--tasawwq-radius, 8px);
    padding: 20px;
    text-align: center;
}

.tasawwq-auction-closed-card h4 {
    margin: 8px 0;
    font-size: 18px;
    color: #1e293b;
}

/* History */
.tasawwq-history-section {
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
}

.tasawwq-history-toggle {
    width: 100%;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    font-family: inherit;
}

.tasawwq-bids-list {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
}

.tasawwq-bid-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: 6px;
    margin-bottom: 4px;
    font-size: 13px;
    background: #f8fafc;
}

.tasawwq-bid-row.is-winning {
    background: #fef2f2;
    border-right: 3px solid var(--tasawwq-primary, #dd3333);
}

.tasawwq-bidder-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tasawwq-bidder-mini-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
}

.tasawwq-bidder-mini-name {
    font-weight: 600;
    color: #1e293b;
}

.tasawwq-bidder-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tasawwq-bid-mini-amount {
    font-weight: 800;
    color: var(--tasawwq-primary, #dd3333);
}

.tasawwq-bid-mini-time {
    font-size: 11px;
    color: #94a3b8;
}

/* Points Badge Widget */
.tasawwq-points-badge-widget {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 6px 14px;
    border-radius: 50px;
    box-shadow: var(--tasawwq-shadow-sm, 0 2px 6px rgba(0,0,0,0.06));
    font-family: var(--tasawwq-font-family, inherit);
    direction: rtl;
}

.tasawwq-badge-inner {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
}

.tasawwq-badge-pts {
    color: #d97706;
    font-weight: 900;
}

.tasawwq-share-btn-pill {
    background: var(--tasawwq-primary, #dd3333);
    color: #ffffff;
    border: none;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.2s;
}

.tasawwq-share-btn-pill:hover {
    opacity: 0.9;
}

/* Floating Toast Notification */
.tasawwq-points-toast {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: #0f172a;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--tasawwq-font-family, inherit);
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    z-index: 999999;
    direction: rtl;
    animation: tasawwq-slide-up 0.4s ease-out;
}

@keyframes tasawwq-slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Modals */
.tasawwq-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    direction: rtl;
    padding: 15px;
}

.tasawwq-modal-card {
    background: #ffffff;
    border-radius: var(--tasawwq-radius, 16px);
    width: 100%;
    max-width: 520px;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    font-family: var(--tasawwq-font-family, inherit);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.tasawwq-modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    position: relative;
}

.tasawwq-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: #1e293b;
}

.tasawwq-modal-close {
    position: absolute;
    left: 0;
    top: 0;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #94a3b8;
}

.tasawwq-terms-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    font-size: 13px;
    line-height: 1.8;
    color: #334155;
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 14px;
}

.tasawwq-terms-compliance-tag {
    font-size: 11px;
    color: #047857;
    background: #ecfdf5;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.tasawwq-btn {
    border: none;
    border-radius: var(--tasawwq-radius, 8px);
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.tasawwq-btn-primary {
    background: var(--tasawwq-primary, #dd3333);
    color: #ffffff;
    width: 100%;
}

.tasawwq-btn-primary:hover {
    background: var(--tasawwq-primary-hover, #bb2222);
}

.tasawwq-btn-secondary {
    background: #0f172a;
    color: #ffffff;
}

.tasawwq-copy-link-box {
    display: flex;
    gap: 8px;
    margin: 16px 0;
}

.tasawwq-copy-link-box input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
    direction: ltr;
}

.tasawwq-social-share-buttons {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.tasawwq-social-btn {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 700;
}

.tasawwq-wa { background: #25d366; }
.tasawwq-fb { background: #1877f2; }
.tasawwq-tg { background: #0088cc; }

.tasawwq-login-prompt {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    padding: 14px;
    border-radius: var(--tasawwq-radius, 8px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
}

.tasawwq-login-btn {
    background: #92400e;
    color: #ffffff !important;
    padding: 6px 14px;
    border-radius: 6px;
    text-decoration: none !important;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
