.eag-wrapper {
    max-width: 760px;
    margin: 20px auto;
    font-family: inherit;
    direction: rtl;
}

.eag-box {
    background: #f7f9fc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.eag-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1e293b;
}

.eag-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
    margin-bottom: 12px;
    direction: ltr;
    text-align: left;
}

.eag-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

.eag-button {
    width: 100%;
    padding: 12px 20px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, opacity .2s;
}

.eag-button:hover:not(:disabled) {
    background: #2563eb;
}

.eag-button:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.eag-message {
    margin-top: 10px;
    font-size: 14px;
    min-height: 20px;
}

.eag-message.error {
    color: #dc2626;
}

.eag-message.success {
    color: #16a34a;
}

.eag-timer {
    margin-top: 6px;
    font-size: 13px;
    color: #64748b;
}

.eag-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 8px;
    max-height: 520px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
}

.eag-results:empty {
    display: none;
}

.eag-item {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    direction: ltr;
    text-align: left;
    cursor: pointer;
    word-break: break-all;
    transition: background .15s, border-color .15s;
    position: relative;
    font-family: monospace;
}

.eag-item:hover {
    background: #e0f2fe;
    border-color: #7dd3fc;
}

.eag-item.copied {
    background: #dcfce7;
    border-color: #86efac;
}

.eag-item.copied::after {
    content: "✓ کپی شد";
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: #16a34a;
    background: #fff;
    padding: 2px 6px;
    border-radius: 4px;
}