/**
 * Estaed Page-Download Styles
 *
 * تنسيقات عصرية لصفحات الطلبات والتنزيلات
 *
 * @package Estaed_Page_Download
 * @since 1.0.0
 */

/* ==========================================================================
   CSS Variables - المتغيرات الأساسية
   ========================================================================== */
:root {
    /* الألوان الأساسية - هوية استعد */
    --estaed-primary: #22c55e;
    --estaed-primary-dark: #16a34a;
    --estaed-primary-light: #86efac;
    --estaed-primary-bg: #f0fdf4;

    /* ألوان ثانوية */
    --estaed-secondary: #64748b;
    --estaed-secondary-dark: #475569;
    --estaed-secondary-light: #94a3b8;

    /* ألوان الحالات */
    --estaed-success: #22c55e;
    --estaed-warning: #f59e0b;
    --estaed-error: #ef4444;
    --estaed-info: #3b82f6;

    /* ألوان الخلفية */
    --estaed-bg: #ffffff;
    --estaed-bg-secondary: #f8fafc;
    --estaed-bg-tertiary: #f1f5f9;

    /* ألوان النصوص */
    --estaed-text: #1e293b;
    --estaed-text-secondary: #64748b;
    --estaed-text-muted: #94a3b8;

    /* الحدود */
    --estaed-border: #e2e8f0;
    --estaed-border-light: #f1f5f9;

    /* الظلال */
    --estaed-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --estaed-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --estaed-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --estaed-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    /* التقريب */
    --estaed-radius-sm: 6px;
    --estaed-radius: 10px;
    --estaed-radius-lg: 16px;
    --estaed-radius-full: 9999px;

    /* التحولات */
    --estaed-transition: all 0.2s ease;
    --estaed-transition-slow: all 0.3s ease;
}

/* ==========================================================================
   Base Styles - التنسيقات الأساسية
   ========================================================================== */
.estaed-orders-wrapper,
.estaed-downloads-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--estaed-text);
    line-height: 1.7;
    direction: rtl;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    font-size: 1rem;
}

/* ==========================================================================
   Page Header - رأس الصفحة
   ========================================================================== */
.estaed-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--estaed-border-light);
}

.estaed-header-content {
    flex: 1;
}

.estaed-page-title {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 2rem;
    font-weight: 700;
    color: var(--estaed-text);
    margin: 0 0 10px 0;
}

.estaed-title-icon {
    width: 36px;
    height: 36px;
    color: var(--estaed-primary);
}

.estaed-page-subtitle {
    font-size: 1.1rem;
    color: var(--estaed-text-secondary);
    margin: 0;
}

.estaed-orders-count,
.estaed-downloads-count {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--estaed-primary-bg);
    padding: 16px 24px;
    border-radius: var(--estaed-radius);
    border: 1px solid var(--estaed-primary-light);
}

.estaed-count-number {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--estaed-primary-dark);
    line-height: 1;
}

.estaed-count-label {
    font-size: 1rem;
    color: var(--estaed-primary);
    margin-top: 4px;
}

/* ==========================================================================
   Orders Grid - شبكة الطلبات
   ========================================================================== */
.estaed-orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 24px;
}

/* ==========================================================================
   Order Card - بطاقة الطلب
   ========================================================================== */
.estaed-order-card {
    background: var(--estaed-bg);
    border-radius: var(--estaed-radius-lg);
    box-shadow: var(--estaed-shadow);
    border: 1px solid var(--estaed-border);
    overflow: hidden;
    transition: var(--estaed-transition);
}

.estaed-order-card:hover {
    box-shadow: var(--estaed-shadow-md);
    transform: translateY(-2px);
}

/* Card Header - رأس البطاقة */
.estaed-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--estaed-bg-secondary);
    border-bottom: 1px solid var(--estaed-border-light);
}

.estaed-order-number {
    display: flex;
    flex-direction: column;
}

.estaed-order-number .estaed-label {
    font-size: 0.9rem;
    color: var(--estaed-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.estaed-order-number .estaed-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--estaed-text);
}

/* Order Status - حالة الطلب */
.estaed-order-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--estaed-radius-full);
    font-size: 0.95rem;
    font-weight: 600;
}

.estaed-order-status svg {
    width: 14px;
    height: 14px;
}

.estaed-order-status.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.estaed-order-status.status-processing {
    background: #dbeafe;
    color: #1e40af;
}

.estaed-order-status.status-on-hold {
    background: #fef3c7;
    color: #92400e;
}

.estaed-order-status.status-completed {
    background: var(--estaed-primary-bg);
    color: var(--estaed-primary-dark);
}

.estaed-order-status.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.estaed-order-status.status-refunded {
    background: #f3e8ff;
    color: #6b21a8;
}

.estaed-order-status.status-failed {
    background: #fee2e2;
    color: #991b1b;
}

/* Card Body - محتوى البطاقة */
.estaed-card-body {
    padding: 20px;
}

/* Order Details - تفاصيل الطلب */
.estaed-order-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.estaed-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.estaed-detail-icon {
    width: 20px;
    height: 20px;
    color: var(--estaed-primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.estaed-detail-content {
    display: flex;
    flex-direction: column;
}

.estaed-detail-label {
    font-size: 0.9rem;
    color: var(--estaed-text-muted);
}

.estaed-detail-value {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--estaed-text);
}

.estaed-detail-value.estaed-price {
    color: var(--estaed-primary-dark);
}

/* Order Items - منتجات الطلب */
.estaed-order-items {
    background: var(--estaed-bg-secondary);
    border-radius: var(--estaed-radius);
    padding: 16px;
}

.estaed-items-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--estaed-text-secondary);
    margin: 0 0 12px 0;
}

.estaed-items-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.estaed-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed var(--estaed-border);
}

.estaed-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.estaed-item-name {
    font-size: 1.05rem;
    color: var(--estaed-text);
    flex: 1;
}

.estaed-item-qty {
    font-size: 0.95rem;
    color: var(--estaed-text-muted);
    margin: 0 12px;
}

.estaed-download-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--estaed-primary-bg);
    color: var(--estaed-primary);
    border-radius: var(--estaed-radius-full);
}

.estaed-download-badge svg {
    width: 14px;
    height: 14px;
}

/* Card Footer - أسفل البطاقة */
.estaed-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--estaed-bg-secondary);
    border-top: 1px solid var(--estaed-border-light);
    gap: 12px;
}

.estaed-no-downloads-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--estaed-text-muted);
}

.estaed-no-downloads-badge svg {
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   Buttons - الأزرار
   ========================================================================== */
.estaed-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 22px;
    font-size: 1.05rem;
    font-weight: 600;
    border: none;
    border-radius: var(--estaed-radius);
    cursor: pointer;
    transition: var(--estaed-transition);
    text-decoration: none;
    white-space: nowrap;
}

.estaed-btn svg {
    width: 20px;
    height: 20px;
}

.estaed-btn-primary {
    background: var(--estaed-primary);
    color: white;
}

.estaed-btn-primary:hover {
    background: var(--estaed-primary-dark);
    color: white;
    transform: translateY(-1px);
}

.estaed-btn-secondary {
    background: var(--estaed-bg);
    color: var(--estaed-text-secondary);
    border: 1px solid var(--estaed-border);
}

.estaed-btn-secondary:hover {
    background: var(--estaed-bg-secondary);
    color: var(--estaed-text);
    border-color: var(--estaed-secondary-light);
}

.estaed-btn-download {
    background: var(--estaed-primary);
    color: white;
    padding: 8px 16px;
}

.estaed-btn-download:hover {
    background: var(--estaed-primary-dark);
    color: white;
}

.estaed-btn-large {
    padding: 14px 28px;
    font-size: 1rem;
}

/* Toggle Downloads Button */
.estaed-toggle-downloads {
    flex: 1;
}

.estaed-toggle-downloads .estaed-chevron {
    width: 16px;
    height: 16px;
    transition: var(--estaed-transition);
}

.estaed-toggle-downloads[aria-expanded="true"] .estaed-chevron {
    transform: rotate(180deg);
}

/* ==========================================================================
   Downloads Panel - لوحة التنزيلات
   ========================================================================== */
.estaed-downloads-panel {
    border-top: 1px solid var(--estaed-border-light);
    background: var(--estaed-bg);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 1000px;
    }
}

.estaed-downloads-content {
    padding: 20px;
}

/* Loading State */
.estaed-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 12px;
    color: var(--estaed-text-secondary);
}

.estaed-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--estaed-border);
    border-top-color: var(--estaed-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Downloads List */
.estaed-downloads-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.estaed-download-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--estaed-bg-secondary);
    border-radius: var(--estaed-radius);
    border: 1px solid var(--estaed-border-light);
    transition: var(--estaed-transition);
}

.estaed-download-item:hover {
    border-color: var(--estaed-primary-light);
    background: var(--estaed-primary-bg);
}

.estaed-download-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--estaed-primary-bg);
    color: var(--estaed-primary);
    border-radius: var(--estaed-radius);
    flex-shrink: 0;
}

.estaed-download-icon svg {
    width: 24px;
    height: 24px;
}

.estaed-download-info {
    flex: 1;
    min-width: 0;
}

.estaed-download-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--estaed-text);
    margin: 0 0 6px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.estaed-download-file {
    font-size: 1rem;
    color: var(--estaed-text-secondary);
    margin: 0 0 10px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.estaed-download-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.estaed-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--estaed-text-muted);
}

.estaed-meta-item svg {
    width: 16px;
    height: 16px;
}

/* No Downloads */
.estaed-no-downloads {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: var(--estaed-text-muted);
}

.estaed-icon-large {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* ==========================================================================
   Downloads Page - صفحة التنزيلات
   ========================================================================== */

/* Filter Bar */
.estaed-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
}

.estaed-search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.estaed-search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--estaed-text-muted);
    pointer-events: none;
}

.estaed-search-input {
    width: 100%;
    padding: 14px 48px 14px 18px;
    font-size: 1.05rem;
    border: 1px solid var(--estaed-border);
    border-radius: var(--estaed-radius);
    background: var(--estaed-bg);
    transition: var(--estaed-transition);
}

.estaed-search-input:focus {
    outline: none;
    border-color: var(--estaed-primary);
    box-shadow: 0 0 0 3px var(--estaed-primary-bg);
}

.estaed-view-toggle {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--estaed-bg-secondary);
    border-radius: var(--estaed-radius);
}

.estaed-view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--estaed-text-muted);
    border-radius: var(--estaed-radius-sm);
    cursor: pointer;
    transition: var(--estaed-transition);
}

.estaed-view-btn:hover {
    color: var(--estaed-text-secondary);
}

.estaed-view-btn.active {
    background: var(--estaed-bg);
    color: var(--estaed-primary);
    box-shadow: var(--estaed-shadow-sm);
}

.estaed-view-btn svg {
    width: 20px;
    height: 20px;
}

/* Downloads Grid */
.estaed-downloads-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Download Group */
.estaed-download-group {
    background: var(--estaed-bg);
    border-radius: var(--estaed-radius-lg);
    box-shadow: var(--estaed-shadow);
    border: 1px solid var(--estaed-border);
    overflow: hidden;
}

.estaed-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--estaed-bg-secondary);
    border-bottom: 1px solid var(--estaed-border-light);
}

.estaed-group-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.estaed-group-order {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--estaed-text);
}

.estaed-group-date {
    font-size: 1rem;
    color: var(--estaed-text-muted);
}

.estaed-group-count {
    font-size: 1rem;
    color: var(--estaed-primary);
    background: var(--estaed-primary-bg);
    padding: 6px 14px;
    border-radius: var(--estaed-radius-full);
}

.estaed-group-files {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    padding: 20px;
}

/* List View */
.estaed-downloads-grid.list-view .estaed-group-files {
    grid-template-columns: 1fr;
}

.estaed-downloads-grid.list-view .estaed-file-card {
    flex-direction: row;
}

/* File Card */
.estaed-file-card {
    display: flex;
    flex-direction: column;
    background: var(--estaed-bg);
    border: 1px solid var(--estaed-border);
    border-radius: var(--estaed-radius);
    padding: 20px;
    transition: var(--estaed-transition);
}

.estaed-file-card:hover {
    border-color: var(--estaed-primary-light);
    box-shadow: var(--estaed-shadow-md);
}

.estaed-file-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: var(--estaed-bg-secondary);
    border-radius: var(--estaed-radius);
    position: relative;
}

.estaed-file-icon svg {
    width: 32px;
    height: 32px;
    color: var(--estaed-secondary);
}

.estaed-file-ext {
    position: absolute;
    bottom: -4px;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    background: var(--estaed-secondary);
    padding: 3px 8px;
    border-radius: var(--estaed-radius-sm);
}

/* File Type Colors */
.estaed-file-card.file-pdf .estaed-file-icon { background: #fee2e2; }
.estaed-file-card.file-pdf .estaed-file-icon svg { color: #dc2626; }
.estaed-file-card.file-pdf .estaed-file-ext { background: #dc2626; }

.estaed-file-card.file-doc .estaed-file-icon { background: #dbeafe; }
.estaed-file-card.file-doc .estaed-file-icon svg { color: #2563eb; }
.estaed-file-card.file-doc .estaed-file-ext { background: #2563eb; }

.estaed-file-card.file-excel .estaed-file-icon { background: #dcfce7; }
.estaed-file-card.file-excel .estaed-file-icon svg { color: #16a34a; }
.estaed-file-card.file-excel .estaed-file-ext { background: #16a34a; }

.estaed-file-card.file-zip .estaed-file-icon { background: #fef3c7; }
.estaed-file-card.file-zip .estaed-file-icon svg { color: #d97706; }
.estaed-file-card.file-zip .estaed-file-ext { background: #d97706; }

.estaed-file-card.file-audio .estaed-file-icon { background: #f3e8ff; }
.estaed-file-card.file-audio .estaed-file-icon svg { color: #9333ea; }
.estaed-file-card.file-audio .estaed-file-ext { background: #9333ea; }

.estaed-file-card.file-video .estaed-file-icon { background: #fce7f3; }
.estaed-file-card.file-video .estaed-file-icon svg { color: #db2777; }
.estaed-file-card.file-video .estaed-file-ext { background: #db2777; }

.estaed-file-card.file-image .estaed-file-icon { background: #e0e7ff; }
.estaed-file-card.file-image .estaed-file-icon svg { color: #4f46e5; }
.estaed-file-card.file-image .estaed-file-ext { background: #4f46e5; }

/* File Info */
.estaed-file-info {
    flex: 1;
    text-align: center;
    margin-bottom: 16px;
}

.estaed-file-product {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--estaed-text);
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.estaed-file-name {
    font-size: 1rem;
    color: var(--estaed-text-muted);
    margin: 0 0 14px 0;
    word-break: break-all;
}

.estaed-file-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.estaed-meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--estaed-text-secondary);
    background: var(--estaed-bg-secondary);
    padding: 6px 12px;
    border-radius: var(--estaed-radius-full);
}

.estaed-meta-badge svg {
    width: 14px;
    height: 14px;
}

.estaed-meta-badge.estaed-expires {
    color: var(--estaed-warning);
    background: #fef3c7;
}

/* File Card Download Button */
.estaed-file-card .estaed-btn-download {
    width: 100%;
    justify-content: center;
}

/* List View Adjustments */
.estaed-downloads-grid.list-view .estaed-file-card {
    flex-direction: row;
    align-items: center;
    gap: 20px;
    padding: 16px 20px;
}

.estaed-downloads-grid.list-view .estaed-file-icon {
    margin: 0;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}

.estaed-downloads-grid.list-view .estaed-file-icon svg {
    width: 28px;
    height: 28px;
}

.estaed-downloads-grid.list-view .estaed-file-info {
    text-align: right;
    margin-bottom: 0;
}

.estaed-downloads-grid.list-view .estaed-file-meta {
    justify-content: flex-start;
}

.estaed-downloads-grid.list-view .estaed-btn-download {
    width: auto;
    flex-shrink: 0;
}

/* No Results */
.estaed-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--estaed-text-muted);
}

.estaed-no-results svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.estaed-no-results p {
    font-size: 1rem;
    margin: 0;
}

/* ==========================================================================
   Empty State - حالة عدم وجود بيانات
   ========================================================================== */
.estaed-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 40px;
    background: var(--estaed-bg-secondary);
    border-radius: var(--estaed-radius-lg);
    border: 2px dashed var(--estaed-border);
}

.estaed-empty-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--estaed-bg);
    border-radius: 50%;
    margin-bottom: 24px;
}

.estaed-empty-icon svg {
    width: 40px;
    height: 40px;
    color: var(--estaed-text-muted);
}

.estaed-empty-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--estaed-text);
    margin: 0 0 14px 0;
}

.estaed-empty-text {
    font-size: 1.15rem;
    color: var(--estaed-text-secondary);
    margin: 0 0 28px 0;
    max-width: 420px;
}

/* ==========================================================================
   Pagination - ترقيم الصفحات
   ========================================================================== */
.estaed-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--estaed-border-light);
}

.estaed-pagination a,
.estaed-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--estaed-text-secondary);
    background: var(--estaed-bg);
    border: 1px solid var(--estaed-border);
    border-radius: var(--estaed-radius);
    text-decoration: none;
    transition: var(--estaed-transition);
}

.estaed-pagination a:hover {
    color: var(--estaed-primary);
    border-color: var(--estaed-primary);
    background: var(--estaed-primary-bg);
}

.estaed-pagination .current {
    color: white;
    background: var(--estaed-primary);
    border-color: var(--estaed-primary);
}

.estaed-pagination .prev svg,
.estaed-pagination .next svg {
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   Notice Messages - رسائل التنبيه
   ========================================================================== */
.estaed-notice {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 24px;
    border-radius: var(--estaed-radius);
    font-size: 1.1rem;
}

.estaed-notice-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.estaed-notice-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.estaed-notice-success {
    background: var(--estaed-primary-bg);
    color: var(--estaed-primary-dark);
    border: 1px solid var(--estaed-primary-light);
}

/* ==========================================================================
   Responsive Design - التصميم المتجاوب
   ========================================================================== */
@media (max-width: 1024px) {
    .estaed-orders-grid {
        grid-template-columns: 1fr;
    }

    .estaed-order-details {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .estaed-orders-wrapper,
    .estaed-downloads-wrapper {
        padding: 16px;
    }

    .estaed-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .estaed-orders-count,
    .estaed-downloads-count {
        flex-direction: row;
        gap: 8px;
        padding: 12px 20px;
    }

    .estaed-count-number {
        font-size: 1.5rem;
    }

    .estaed-page-title {
        font-size: 1.5rem;
    }

    .estaed-card-footer {
        flex-direction: column;
    }

    .estaed-toggle-downloads,
    .estaed-btn-secondary {
        width: 100%;
    }

    .estaed-order-details {
        grid-template-columns: 1fr;
    }

    .estaed-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .estaed-search-box {
        max-width: none;
    }

    .estaed-view-toggle {
        justify-content: center;
    }

    .estaed-group-files {
        grid-template-columns: 1fr;
    }

    .estaed-downloads-grid.list-view .estaed-file-card {
        flex-direction: column;
    }

    .estaed-downloads-grid.list-view .estaed-file-info {
        text-align: center;
    }

    .estaed-downloads-grid.list-view .estaed-file-meta {
        justify-content: center;
    }

    .estaed-downloads-grid.list-view .estaed-btn-download {
        width: 100%;
    }

    .estaed-download-item {
        flex-direction: column;
        text-align: center;
    }

    .estaed-download-meta {
        justify-content: center;
    }

    .estaed-empty-state {
        padding: 60px 24px;
    }
}

@media (max-width: 480px) {
    .estaed-page-title {
        font-size: 1.25rem;
    }

    .estaed-title-icon {
        width: 24px;
        height: 24px;
    }

    .estaed-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .estaed-group-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .estaed-group-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .estaed-pagination a,
    .estaed-pagination span {
        min-width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }
}
